Section 2.2
Gate symbols and their algebraic equivalents

Gates correspond to operators in Boolean algebra. + is used for OR while * or a larger dot is used for AND. Here are some examples of gates and their equivalent expressions:


Fig. 2.2.1: Equivalence of gates and Boolean algebra expressions

Often the dot is omitted from AND expressions, so it is more likely to see AB = C instead.

It is not coincidental that the symbols for multiplication is used for AND and the symbol for addition used for OR. In fact, the truth table of AND is identical to multiplication of two logic variables: anything times zero is zero, and one times one is one. The truth table for OR is the same as addition except for the last row, since 1+11 in the world of numbers. Nevertheless the similarity is close so the analogy with addition is maintained. AND is often called Boolean multiplication and OR Boolean addition.

Logic circuits are translated into algebraic expressions gate by gate. Internal wires are sometimes labeled with the algebraic expression of the gates that create their value, as shown in Fig. 2.2.2.


Fig. 2.2.2: Logic circuit; internal wires are labeled

Since AB = x1 in Fig. 2.2.2 and CD = x2, we could replace the names x1 and x2 in the expression x1+x2 = E. Thus, the expression for Fig. 2.2.2 becomes AB + CD = E. In fact, the output wire E is usually labeled merely as AB + CD.

Here are the Boolean algebra operators for the other gates:


Fig. 2.2.3: Boolean algebra operators for other gates

Negation has several notations. The horizontal bar above a logic variable is very common as is the use of the prime mark (single apostrophe), negative symbol or a minus sign with a little hook on the right end. Since it is easier to type the prime mark or the negative symbol, we will use that more often.

The NAND, NOR and XNOR gates use the same notation as their positive counterparts, except for the negation bar on top.

Another common notation uses a V symbol for AND and OR. The V is inverted for AND and right side up for OR. Another but far less common notation uses a U instead of a V. We will not use these notations but they are found in other books.

In this web book, we sometimes use @ to represent exclusive OR, since the traditional symbol isn't available on most keyboards.

All these variants are show in Fig. 2.2.4. The first example in the second column is the preferred version for this book. Notice that AND and NOT have many variants, some of which are difficult to type on a computer keyboard! The overbar is quite difficult.


Fig. 2.2.4: Alternate notations for AND, OR, NOT, NAND, NOR, XOR and XNOR