Logic gates and truth tables for 0478 and 2210 Computer Science
0478 · 2210 · Published 2026-11-13
How this was made: Written by AI and checked by AI, including Anthropic's Claude, against the official Cambridge syllabus (0478/2210, 2026–2028, version 6). It may contain mistakes and we revise it when errors are found — spot one? Email [email protected].
Boolean logic is topic 10 of the 0478 and 2210 syllabus and is examined on Paper 2. You need six gates, their truth tables, and the ability to move between four forms of the same logic: a problem statement, a logic expression, a logic circuit and a truth table.
The rules the syllabus sets
- Six gates: NOT, AND, OR, NAND, NOR and XOR (also written EOR).
- NOT has a single input. Every other gate is limited to two inputs.
- Circuits have at most three inputs and one output.
- Draw the circuit for the statement exactly as given, without simplifying it.
- Use the standard gate symbols from section 4 of the syllabus.
The six gates
NOT inverts its input: 0 becomes 1 and 1 becomes 0. For the two-input gates:
A B | AND OR NAND NOR XOR 0 0 | 0 0 1 1 0 0 1 | 0 1 1 0 1 1 0 | 0 1 1 0 1 1 1 | 1 1 0 0 0
- AND is 1 only when both inputs are 1.
- OR is 1 when at least one input is 1.
- NAND is NOT AND: 0 only when both inputs are 1.
- NOR is NOT OR: 1 only when both inputs are 0.
- XOR is 1 when the inputs are different.
Three-input truth tables
With three inputs there are 2 × 2 × 2 = 8 rows. List the inputs in binary counting order, 000 up to 111, so you can't miss or repeat a row. Add a column for each part of the expression before the final output. Most lost marks in this topic come from skipping those intermediate columns.
Example: X = (A AND B) OR (NOT C).
A B C | A AND B | NOT C | X 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
The circuit has an AND gate taking A and B, a NOT gate on C, and an OR gate combining their two outputs into X: three gates, each within the two-input limit.
From a problem statement
Problem statements describe the logic in words. Turn each condition into an input letter, then translate 'and', 'or' and 'not' directly. For example: an alarm (X) sounds when the door is open (D) and the system is armed (S), or when the panic button is pressed (P).
X = (D AND S) OR P D S P | X 0 0 0 | 0 0 0 1 | 1 0 1 0 | 0 0 1 1 | 1 1 0 0 | 0 1 0 1 | 1 1 1 0 | 1 1 1 1 | 1
Check your table against the statement: the alarm is on whenever P = 1, and otherwise only in the row where D = 1 and S = 1.
From a truth table to an expression
Find every row where the output is 1. Write each of those rows as an AND of its inputs, using NOT for any input that is 0, then join the rows with OR. For an output that is 1 only in rows 011 and 111, that gives (NOT A AND B AND C) OR (A AND B AND C). The syllabus doesn't ask you to simplify, and you must still respect the two-input limit when you draw it, so break longer ANDs into pairs.
Practise it on CodeArc
- Boolean logic — O Level 2210
- Boolean logic — IGCSE 0478
- All Computer Science topics
- Cambridge pseudocode for 0478 and 2210
Questions
Which logic gates are in the 0478 and 2210 syllabus?
NOT, AND, OR, NAND, NOR and XOR (also called EOR). NOT has one input; all the other gates are limited to two inputs.
How many inputs can a logic circuit have in 0478?
Logic circuits in 0478 and 2210 are limited to a maximum of three inputs and one output, so a full truth table has 8 rows.
Should I simplify a logic circuit before drawing it?
No. The syllabus says circuits must be drawn for the statement given, without simplification.