A1.2.4 Truth Tables
WORK IN PROGRESS
This article has not been finished yet and most likely contains mistakes or misses very important stuff
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
- Identify all inputs (A, B, C�) and add a column for each.
- Add 2n rows and fill input columns counting up in binary.
- Add an intermediate column for each operation inside the expression.
- Calculate each intermediate column using the gate rules.
- Use the intermediate results to fill in the final Q column.
Example 1: (A AND B) OR NOT C
| A | B | C | A AND B | NOT C | Q |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |
Example 2: (A XOR B) AND NOT C
| A | B | C | A XOR B | NOT C | Q |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 |
Truth Tables from Logic Diagrams
When given a logic diagram rather than a Boolean expression:
- Identify all inputs and the output Q.
- Trace through the circuit left to right.
- Add an intermediate column for each gate's output.
- Fill in each column using the gate's rule.
- The last gate's output = Q.
Example: AND ? NOT = NAND
| A | B | AND output | Q (NOT of AND) |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 |
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.