Cambridge A2 Level Computer Science 9618 · 20.1 Programming Paradigms

Q22 · 9618/32/O/N/25 Q11

Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 1 of 2.

Q229618/32/O/N/25original Q11Structured · 7 marks
Question 11 from 9618/32/O/N/25

Worked solution

Load location 300 into A and 420 into B. B holds 150, so LDI B loads the contents of address 150 (26). Then add A (86): 26 + 86 = 112.

LDD 300
STO A
LDD 420
STO B
LDI B
ADD A
STO Answer
A:
B:
Answer:

LDD 300 [1]

STO used correctly with a label [1]

LDD 420 [1]

LDI B (uses the value in B as an address) [1]

ADD A [1]

Labels A:, B: and Answer: set up as addresses away from the code, and the correct contents [1]

LabelContents
A:86
B:150
Answer:112

Correct final value 112 in Answer: [1]

KEY IDEALDI treats the value in a label as an address and loads from that address.
TOTAL 7 marks

Official mark scheme

Mark scheme for 9618/32/O/N/25 question 11
VIDEO
▶ Whole paper

Video solution of the whole paper · by Zafar Ali Khan (ZAK). 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.