Skip to main content
Engineering LibreTexts

2.3: Truth Tables

  • Page ID
    26948
  • \( \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}}\)

    Boolean functions are functions that perform operations on sets of Boolean variables. For example, a Boolean function f, which takes 2 input values A and B, would produce an output value, f(A,B). The input values A and B are binary, as is the output value f(A,B). It is possible to completely characterize the function f(A,B) by enumerating all the possible input combinations and A and B (00, 01, 10, 11), and specifying the output f(A,B) for each input combination.

    A truth table is standard way to represent a Boolean function which enumerates all the possible outputs of that function. So assume f(A,B) is the AND operator. The truth table for this operation is:

    Table \(\PageIndex{1}\): AND truth table

    Input

    Output

    A

    B

    AND

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

    More than one function can be represented in a truth table. A truth table that represents two functions, AND and OR, would be the following:

    Table \(\PageIndex{2}\): AND and OR truth table

    Input

    Output

    A

    B

    AND

    OR

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

    All Boolean functions can be represented using truth tables (the proof for this is left for the exercises at the end of this section), though the size could become quite large, or possibly infinite. For example, consider two Boolean functions f1(A,B,C) and f2(A,B,C). The truth table for these two functions would be written as follows:

    Table \(\PageIndex{3}\): Truth table for f1(A,B,C) and f2(A,B,C)

    Input

    Output

    A

    B

    C

    f1(A,B,C)

    f2(A,B,C)

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

    This page titled 2.3: Truth Tables 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.