Skip to main content
Engineering LibreTexts

4.4: Binary Operations

  • Page ID
    26970
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    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.

    Figure \(\PageIndex{1}\): Truth table for AND and OR

    Input

    Output

    A

    B

    AND

    OR

    XOR

    0 0 0 0 0
    0 1 0 1 1
    1 0 0 1 1
    1 1 1 1 0

    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

    Screen Shot 2020-06-26 at 4.57.15 PM.png

    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

    Screen Shot 2020-06-26 at 4.58.37 PM.png


    This page titled 4.4: Binary Operations is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Charles W. Kann III via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.