The game. Each round shows a logic circuit and the value on each input. Follow the signals through the gates and call the output, Y: 0 or 1, by clicking or pressing 0 or 1. You start with 60 seconds; a right answer adds time and a wrong one takes some away. After each answer every wire shows its value, so you can see how the output was reached. Every three right answers the circuits get bigger, and bigger circuits score more: 10 × inputs × levels of gates (a NOT gate doesn't count as a level).
- Standard: AND, OR and NOT, up to 3 inputs and 2 levels, with each gate's name on it and the Boolean expression under the circuit.
- Advanced: NAND, NOR and XOR as well, up to 4 inputs and 3 levels, and no names or expression: read the symbols.
The gates
Reading a circuit diagram
- The inputs are on the left, each with its value. A wire carries its value along to the gates.
- A dot where wires meet means the wire splits: every branch carries the same value.
- A small hop (a half-circle) means one wire crosses over another without connecting.
- The output, Y, is on the right.
Boolean notation
A · B or AB | A AND B |
A + B | A OR B |
A | NOT A (a bar over the top) |
A ⊕ B | A XOR B: 1 when the inputs differ |
A · B | A NAND B |
A + B | A NOR B |
NOT is worked out first, then AND, then OR, just as multiplication comes before addition. Brackets change the order.
Working out a circuit
- Write each input's value on its wire.Where a wire splits (a dot), every branch carries the same value.
- Work through the gates from left to right.A gate can only be worked out once all its inputs are known.
- Write each gate's output on the wire leaving it.A NOT gate (a triangle and circle) simply flips 0 ↔ 1.
- The value reaching Y is the answer.Example: Y = A·B + A̅·C with A = 1, B = 0, C = 1 → A·B = 0, A̅·C = 0, so Y = 0.
Objective: work out the output of a logic circuit of up to three levels of gates for any combination of inputs, recognise the AND, OR, NOT, NAND, NOR and XOR symbols and their truth tables, and link a circuit diagram to its Boolean expression.
Where this fits
- AQA: AQA A Level Computer Science (7517)
- Cambridge: Cambridge IGCSE Computer Science (0478); Cambridge A Level Computer Science (9618); Cambridge AS Level Computer Science (9618)
- IB: IB Computer Science HL; IB Computer Science SL
- Pearson Edexcel International: Edexcel International GCSE Computer Science (4CP0) Goes beyond Edexcel International GCSE Computer Science (4CP0): 4CP0 has AND, OR and NOT logic statements only; gate symbols, circuits and NAND, NOR and XOR go beyond it.
- USDP: USDP Computer Science