Cambridge AS Level Computer Science 9618 · 4.2 Assembly Language

Q25 · 9618/11/O/N/23 Q8

Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.

Q259618/11/O/N/23original Q8Structured · 10 marks
Question 8 from 9618/11/O/N/23

Worked solution

(a)

Write: the first pass creates the symbol table [1]

(b)(i)

Choose one instruction from each group, each with an operand:

Data movement: LDR #50 or STO 201 [1]

Arithmetic operation: ADD 100 or INC IX [1]

Conditional instruction: JPE 96 [1]

(b)(ii)

Similarity: both load the contents of an address into the Accumulator [1]

Difference: direct uses the address in the operand, whereas indexed adds the contents of IX to the operand and uses that calculated address [1]

(b)(iii)

Write one of: indirect addressing or relative addressing [1]

(c)(i)

AND gives 1 only where both bits are 1.

01001111 AND 10100101 = 00000101 [1]

(c)(ii)

Shift 3 places right with 0s on the left.

00010111 becomes 00000010 [1]

(c)(iii)

XOR gives 1 where the bits differ.

11110111 XOR 00100101 = 11010010 [1]

KEY IDEALearn the addressing modes and work bitwise AND, XOR and shifts bit by bit.
TOTAL 10 marks

Official mark scheme

Mark scheme for 9618/11/O/N/23 question 8
VIDEO
▶ Starts at Q8 (1:24:43)

Starts at Q8 (1:24:43) · by Pseudocode Pro. 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.