Truth tables
The complete, unambiguous way to describe what a logic circuit does — every input combination, every output. The bridge from a requirement to a circuit.
Built from first principles.
Before you start
What you need first
- Boolean basics & gates — the AND/OR/NOT operators and their own little truth tables.
What you'll be able to do
- Build a truth table with the right number of rows (2ⁿ).
- Turn an English requirement into a truth table.
- Recognise a function (AND, XNOR…) from its table.
The universal specification tool
A truth table lists every possible combination of inputs and the output for each. It is the most unambiguous way to say what a circuit does.
- For n inputs, the table has \(2^n\) rows: 1 input → 2, 2 → 4, 3 → 8, 4 → 16, 8 → 256.
- List the inputs in binary counting order (
000, 001, 010…) so you never miss a case.
Building a table from a requirement
"A pump runs when the tank is LOW, but only if the system is ENABLED."
Inputs: E = enabled (1), L = level low (1). Output:
P = pump runs (1). Reason through all four rows:
| E | L | P | Why |
|---|---|---|---|
| 0 | 0 | 0 | off — never run |
| 0 | 1 | 0 | off — never run, even if low |
| 1 | 0 | 0 | enabled, tank fine — don't run |
| 1 | 1 | 1 | enabled and low — run |
A three-input example: parity
Specification: "Output 1 when an odd number of the three inputs is 1." Three inputs → \(2^3 = 8\) rows. Just count the 1s in each row:
| A | B | C | #1s | F |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 2 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 2 | 0 |
| 1 | 1 | 0 | 2 | 0 |
| 1 | 1 | 1 | 3 | 1 |
F=1 row becomes one AND term, OR-ed
together — that's the canonical form you'll formalise in Theme 3. This "odd count" function
is parity, used in error detection.✏️ Try it yourself
(a) How many rows for a function of 5 inputs? (b) Fill the truth table
for F = A·B′. (c) A 2-input gate outputs 1 only when its inputs are
equal — which gate?
Recap — the whole topic on one screen
| Idea | What you own now |
|---|---|
| Truth table | Every input combination + its output |
| Size | n inputs → \(2^n\) rows; list in binary order |
| From a spec | Name inputs/output, reason every row, read the function |
| Discipline | Never skip a row — silent rows are still your design |