# 4.4: Binary Operations

• • Charles W. Kann III
• Adjunct Professor (Computer Science) at Gettysburg College

The other two important Boolean operators, AND and OR, are binary operators because they take two inputs. The AND operator is true (1) if both of its inputs are true (1) (e.g. A and B are both true); if either of its inputs are false (0) then the operator is false (0).

The OR operator is true (1) if either or both of its inputs are true (1) (e.g. either A and B is true, or both are true); it is false (0) if both of its inputs are false (0). The following truth table characterizes the output for the AND and OR functions behaves for the two inputs A and B.

In this text, the AND operator will be shown by the * symbol (A*B) , and the OR operator by the + symbol (A+B) . The * is often dropped, as in algebra (e.g. A*B will be written AB).

Unless it makes sense to do otherwise, this text will include the * include the operator in expressions.

One last Boolean function which is important for many of the circuits in this text is the exclusive-or (XOR). An XOR function is important in that in can often reduce the size of many circuits. The symbol for the XOR is ⊕, so A⊕B means A XOR B. The XOR is often called an odd function, in that it is true (1) when there is an odd number of inputs to the function which are 1, and false when there is an even number of inputs to the function which are 1.

Symbols for the AND, OR, and XOR gates are shown in Figure $$\PageIndex{2}$$. Figure $$\PageIndex{2}$$: AND, OR, and XOR gates

A circuit implementing the AND, OR, and XOR gates in Logisim is shown in Figure $$\PageIndex{3}$$. Figure $$\PageIndex{3}$$: AND, OR, and XOR gate circuit