Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.
Run the program from address 100, writing only what changes.
LDD 10 loads 12. ADD 12 adds 10 to give 22. STO 11 stores 22 at address 11. CMP 14 compares 22 with 22: true. JPE 107 jumps to 107. STO 10 stores 22 at address 10.
| Instruction address | ACC | 10 | 11 | 12 | 13 | 14 |
|---|---|---|---|---|---|---|
| 12 | 11 | 10 | 22 | 22 | ||
| 100 | 12 | |||||
| 101 | 22 | |||||
| 102 | 22 | |||||
| 103 | ||||||
| 104 | ||||||
| 107 | 22 |
ACC 12 at 100 and 22 at 101 [1]
Address 11 = 22 at 102 [1]
Rows 103, 104 then 107 with address 10 = 22 [1]
Write one effect:
10 is loaded into ACC instead of the contents of address 10 (12). The sum would be 20, not 22, so the comparison fails and the program loops forever. [1]
Name a mode that is not in the table and describe it. Any one pair:
Mode: Indirect [1]
Description: the operand is the address of a memory location that contains the address of the data. [1]
Other accepted pairs: Indexed (the address is the operand plus the contents of the Index Register) or Relative (the address is worked out from its distance from a base address).
11110000 OR 00001111 = 11111111 [1]
#30 is 00011110. 00011101 XOR 00011110 = 00000011 [1]
▶ Whole paper
Video solution of the whole paper · by Virtual Help. 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.