Browse lessons

Truth tables

List every input combination and check the corresponding outputs.

Read a truth table

A truth table lists every possible input combination and the output for each one. Each row describes one case.

A circuit with n binary inputs has 2^n input combinations. Two inputs give four rows; three inputs give eight.

AND example

The first two columns are inputs A and B. The final column is the output. AND produces 1 only in the last row, where both inputs are 1.

ABOutput
000
010
100
111

OR example

OR produces 1 whenever at least one input is 1. Compare the middle two rows with the AND table.

ABOutput
000
011
101
111

Check a circuit

  1. Write down its inputs and outputs.
  2. List every input combination.
  3. Set the input switches to match each row.
  4. Record the output values and compare them with the expected behavior.

You can try this with the interactive examples in AND, OR, NOT gates. A table checks all cases, including the combinations you might miss when toggling inputs at random.