A1.2.4 Truth Tables

? Back to A1.2 overview

WORK IN PROGRESS
This article has not been finished yet and most likely contains mistakes or misses very important stuff

What is a Truth Table?

A truth table lists every possible combination of inputs and the resulting output for a logical expression. Used to predict circuit outputs and verify Boolean expressions.

  • For n inputs there are 2n rows.
  • 2 inputs ? 4 rows. 3 inputs ? 8 rows.
  • Fill input columns counting upward in binary (start at 0).
  • The final output column is always labelled Q.

How to Construct a Truth Table

  1. Identify all inputs (A, B, C�) and add a column for each.
  2. Add 2n rows and fill input columns counting up in binary.
  3. Add an intermediate column for each operation inside the expression.
  4. Calculate each intermediate column using the gate rules.
  5. Use the intermediate results to fill in the final Q column.

Example 1: (A AND B) OR NOT C

Logic diagram: (A AND B) OR NOT C A B AND C NOT OR Q
ABCA AND BNOT CQ
000011
001000
010011
011000
100011
101000
110111
111101

Example 2: (A XOR B) AND NOT C

Logic diagram: (A XOR B) AND NOT C A B XOR C NOT AND Q
ABCA XOR BNOT CQ
000010
001000
010111
011100
100111
101100
110010
111000

Truth Tables from Logic Diagrams

When given a logic diagram rather than a Boolean expression:

  1. Identify all inputs and the output Q.
  2. Trace through the circuit left to right.
  3. Add an intermediate column for each gate's output.
  4. Fill in each column using the gate's rule.
  5. The last gate's output = Q.

Example: AND ? NOT = NAND

AND gate followed by NOT gate equals NAND A B AND NOT Q = NAND gate
ABAND outputQ (NOT of AND)
0001
0101
1001
1110

AND followed by NOT always equals NAND.

Boolean Expressions

A Boolean expression is an algebraic expression using Boolean variables and operators. They let you build truth tables directly without needing a diagram.

Common exam expressions:
  • A NOT (B OR C)
  • A AND (B XOR C)
  • (A NOR B) AND C

Treat brackets like maths � evaluate the inner expression first, then apply the outer operation.

Ninja Note: Always show intermediate columns � you get marks for each correct step even if the final answer is wrong. Count your rows: n inputs = 2n rows. Fill input columns by counting up in binary � A alternates 0,1,0,1; B alternates 0,0,1,1; C alternates 0,0,0,0,1,1,1,1 etc.