Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.
Memory: 100 = 101, 101 = 67, 102 = 104, 103 = 100, 104 = 68.
| Instruction | Accumulator |
|---|---|
| LDM #103 | 103 |
| LDD 102 | 104 |
| LDI 103 | 101 |
LDM #103: the number itself, 103 [1]
LDD 102: the contents of address 102, 104 [1]
LDI 103: address 103 holds 100, so load the contents of address 100, 101 [1]
Choose two groups and describe each:
Group name, for example Input and output of data [1]
Description: takes an input from the user, or outputs the character for the value in ACC [1]
Group name, for example Arithmetic operations [1]
Description: carries out addition and subtraction [1]
Other groups that score: unconditional and conditional instructions (move to another instruction identified by a label or address), and compare instructions (compare the ACC with another value).
The value in memory is 00111101. Work out each result bit by bit:
| Instruction | Working | Result |
|---|---|---|
| XOR B11110000 | 00111101 XOR 11110000 | 11001101 |
| OR B01010101 | 00111101 OR 01010101 | 01111101 |
| AND B11111111 | 00111101 AND 11111111 | 00111101 |
Draw a line from XOR B11110000 to 11001101 [1]
Draw a line from OR B01010101 to 01111101 [1]
Draw a line from AND B11111111 to 00111101 [1]
▶ Whole paper
Video solution of the whole paper · by A Levels Academy Islamabad. 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.