Worked solution from the Boolean logic Paper 2 Algorithms, Programming and Logic booklet, Part 3 of 3.
Break the expression into small parts and work from the inputs to X. Each gate has at most two inputs.
Gate 1: a NOT gate with input K. [1]
Gate 2: a NOT gate with input L. [1]
Gate 3: an XOR gate with inputs J and the output of the NOT gate on K. [1]
Gate 4: a NAND gate with inputs the output of the XOR gate and the output of the NOT gate on L. Its output is X. [1]
Work out each part in the working space: A = NOT K, B = J XOR A, C = NOT L, then X = B NAND C. NAND gives 0 only when both inputs are 1.
| J | K | L | A = NOT K | B = J XOR A | C = NOT L | X |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 1 | 0 |
| 0 | 0 | 1 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 0 | 1 | 0 | 1 |
Write the X column as: 0, 1, 1, 1, 1, 1, 0, 1.
First two rows correct [1]
Next two rows correct [1]
Next two rows correct [1]
Last two rows correct [1]
Marks are given by how many of the 8 outputs are right: 8 correct = 4 marks, 6 or 7 = 3, 4 or 5 = 2, 2 or 3 = 1.
▶ Whole paper
Video solution of the whole paper · by MAK CS. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.