Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.
Work through each program (ACC starts at 10, IX = 0).
| Program | Working | ACC content |
|---|---|---|
| 1 | LDI 15: address 15 holds 16, address 16 holds 12; SUB #1 gives 11 | 11 |
| 2 | LDD 14 loads 10; ADD 11 adds 3 to give 13 | 13 |
| 3 | LDM #11; ADD #3 gives 14; SUB 16 takes away 12 to give 2 | 2 |
| 4 | LDR #2 sets IX = 2; LDX 14: address 16 holds 12; ADD #2 gives 14 | 14 |
Program 1 = 11 [1]
Program 2 = 13 [1]
Program 3 = 2 [1]
Program 4 = 14 [1]
ACC starts as 01000110 each time.
| Program | Working | ACC content |
|---|---|---|
| 1 | 01000110 XOR 00001111 | 01001001 |
| 2 | #29 is 00011101; 01000110 AND 00011101 | 00000100 |
| 3 | 01000110 OR 11111111 | 11111111 |
Program 1 = 01001001 [1]
Program 2 = 00000100 [1]
Program 3 = 11111111 [1]
▶ Starts at Q5 (49:17)
Starts at Q5 (49:17) · 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.