Worked solution from the Hardware and Virtual Machines Paper 3 Advanced Theory booklet, Part 2 of 2.
Read the circuit. P comes from an XOR gate with inputs A and B. Q comes from an AND gate with inputs A and B. R comes from an AND gate with inputs P and C. Output Y is an XOR gate with inputs P and C. Output Z is an OR gate with inputs R and Q.
Work out P, Q and R first, then Y and Z:
| A | B | C | P | Q | R | Y | Z |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 |
Working columns P, Q and R all correct [1]
Output column Y correct [1]
Output column Z correct [1]
Write: full adder [1]
It adds three bits (A, B and a carry-in C) and gives a sum and a carry-out.
Use the rows where the output is 1. Write one product term for each row. NOT is written before a letter.
Y = 1 for ABC = 001, 010, 100 and 111:
Y = NOT A . NOT B . C + NOT A . B . NOT C + A . NOT B . NOT C + A . B . C [1]
Purpose of Y: sum bit [1]
Z = 1 for ABC = 011, 101, 110 and 111:
Z = NOT A . B . C + A . NOT B . C + A . B . NOT C + A . B . C [1]
Purpose of Z: carry out (carry bit) [1]
▶ Topic lesson
A lesson on this topic · by Craig'n'Dave. 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.