Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.
Write the register names in order, one for each gap:
Program Counter [1]
Memory Address Register [1]
Memory Data Register [1]
Current Instruction Register [1]
Program Counter [1]
Run the program one instruction at a time. LDX adds the Index Register to the address, so with IX = 2 it reads address 367, and with IX = 3 it reads address 368. Blank cells mean no change.
| Instruction address | ACC | 365 | 366 | 367 | 368 | IX | Output |
|---|---|---|---|---|---|---|---|
| 1 | 3 | 65 | 66 | 0 | |||
| 200 | 1 | ||||||
| 201 | |||||||
| 202 | |||||||
| 203 | 2 | ||||||
| 204 | 2 | ||||||
| 205 | 2 | ||||||
| 206 | 65 | ||||||
| 207 | A | ||||||
| 208 | |||||||
| 200 | 2 | ||||||
| 201 | |||||||
| 202 | |||||||
| 203 | 3 | ||||||
| 204 | 3 | ||||||
| 205 | 3 | ||||||
| 206 | 66 | ||||||
| 207 | B | ||||||
| 208 | |||||||
| 200 | 3 | ||||||
| 201 | |||||||
| 202 | |||||||
| 209 |
Rows 200 to 202 (ACC = 1, compare is False so no jump) [1]
Rows 203 to 205 (ACC = 2, address 365 = 2, IX = 2) [1]
Rows 206 to 208 (ACC = 65, output A) [1]
Rows 200 to 205 on the second loop (ACC = 2, then 3, address 365 = 3, IX = 3) [1]
Rows 206 to 208 (ACC = 66, output B) [1]
Rows 200, 201, 202, 209 (ACC = 3, compare is True so jump to 209) [1]
Shift every bit 2 places left and fill the right with zeros: 00110101 → 11010100.
11010100 [1]
Each shift right divides by 2, so 3 shifts divide by 23 = 8.
The number is divided by 8 (only the whole number part is kept) [1]
▶ Whole paper
Video solution of the whole paper · by qiphyedu. 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.