Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.
Work through each program (ACC starts at 2, IX = 50).
| Program | Working | ACC content |
|---|---|---|
| 1 | LDM #50; INC ACC gives 51; SUB #1 gives 50 | 50 |
| 2 | LDI 51: address 51 holds 50, address 50 holds 48; ADD 52 (49) gives 97 | 97 |
| 3 | LDR #2 sets IX = 2; LDX 50: address 52 holds 49; DEC ACC gives 48 | 48 |
| 4 | LDD 52 loads 49; SUB 54 (6) gives 43; INC ACC gives 44 | 44 |
Program 1 = 50 [1]
Program 2 = 97 [1]
Program 3 = 48 [1]
Program 4 = 44 [1]
ACC starts as 11111111 each time.
| Instruction | Working | ACC content |
|---|---|---|
| 1 | LSL #2: shift left 2 places, 0s on the right | 11111100 |
| 2 | XOR 100 (00001101) | 11110010 |
| 3 | AND 103 (00110111) | 00110111 |
Instruction 1 = 11111100 [1]
Instruction 2 = 11110010 [1]
Instruction 3 = 00110111 [1]
▶ Starts at Q3 (16:27)
Starts at Q3 (16:27) · 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.