Worked solution from the Information representation Paper 1 Theory Fundamentals booklet, Part 1 of 3.
To make every bit 1, OR with 11111111 (denary 255).
Opcode: OR [1]
Operand: #255 [1]
(XOR #154 or OR #154 also score.)
XOR flips the bits where the operand has a 1. To flip all bits use 11111111.
Opcode: XOR [1]
Operand: #255 [1]
0111 = 7 and 1110 = E, so 7E [1]
Shift every bit 3 places left, dropping 011 from the left and adding 000 on the right:
11110000 [1]
127 = 01111111 and 12 = 00001100. [1]
Subtract by adding −127. Invert 01111111 to get 10000000, add 1: 10000001. [1]
Add: 00001100 + 10000001 = 10001101 [1]
▶ Whole paper
Video solution of the whole paper · by Exam Ninja. 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.