Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.
Work through each program with the memory shown (ACC starts at 12, IX = 1).
| Program | Working | ACC content |
|---|---|---|
| 1 | LDD 20 loads 2; ADD #2 gives 4 | 4 |
| 2 | LDX 22: address 22 + 1 = 23, which holds 5 | 5 |
| 3 | LDI 25: address 25 holds 22, address 22 holds 3; INC ACC gives 4; SUB 22 (3) gives 1 | 1 |
| 4 | LDD 19 loads 24; LDM #5 loads 5; LDM #25 loads 25 | 25 |
Program 1 = 4 [1]
Program 2 = 5 [1]
Program 3 = 1 [1]
Program 4 = 25 [1]
ACC starts as 10011010 each time.
| Program | Working | ACC content |
|---|---|---|
| 1 | 10011010 AND 11111111 | 10011010 |
| 2 | 10011010 XOR 01001111 | 11010101 |
| 3 | #30 is 00011110; 10011010 OR 00011110 | 10011110 |
Program 1 = 10011010 [1]
Program 2 = 11010101 [1]
Program 3 = 10011110 [1]
▶ Starts at Q4 (50:56)
Starts at Q4 (50:56) · by Pseudocode Pro. 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.