9618/13/M/J/22 question 3: worked solution (May/June 2022, 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. Q20 9618/13/M/J/22 original Q3 Structured · 10 marks Worked solution (a) 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] (b) 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). (c) 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] KEY IDEA LDM loads the number, LDD loads from an address, and LDI loads from the address that is stored at an address. TOTAL 10 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by A Levels Academy Islamabad. Tap the picture to open it on YouTube.