9618/13/O/N/25 question 6: worked solution (October/November 2025, paper 13)
Show as plain textHide plain text
Cambridge AS Level Computer Science 9618 · 4.2 Assembly Language Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3. Q34 9618/13/O/N/25 original Q6 Structured · 11 marks Worked solution (a) Work on the bits, one instruction at a time: AND 101: 0000 1111 AND 1010 1110 = 0000 1110 LDM #100: 100 = 64 + 32 + 4 = 0110 0100 XOR &F1: &F1 = 1111 0001. 0000 0001 XOR 1111 0001 = 1111 0000 CMP 101 only compares, so the ACC does not change. Current contents of the ACC Instruction Contents of the ACC after 0000 1111 AND 101 0000 1110 0000 0000 LDM #100 0110 0100 0000 0001 XOR &F1 1111 0000 0001 0001 CMP 101 0001 0001 Row 1 correct [1] Row 2 correct [1] Row 3 correct [1] Row 4 correct [1] (b) The MAR stores the address of the next instruction or data to be read from, or written to, memory [1] The address is received from the Program Counter (PC) [1] The MDR stores the data/instruction that has been read from (or is to be written to) the address in the MAR [1] The instruction then passes to the CIR to be decoded and executed [1] (c) Loading data into the accumulator: data movement [1] Incrementing the index register: arithmetic operations [1] Branching to another address: conditional and unconditional jump (branch) instructions [1] KEY IDEA Do bitwise work bit by bit (CMP changes no register), and remember MAR holds addresses while MDR holds the data. TOTAL 11 marks Official mark scheme VIDEO ▶ Topic lesson A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.