Question 6

OCR Computer Science November 2020 Paper 1AS9 marks

On the specification

(a)
1.2 Software and software development
(b)(i)
2.2 Problem solving and programming
(b)(ii)
1.2 Software and software development
(b)(iii)
1.2 Software and software development2.2 Problem solving and programming
(c)
1.1 The characteristics of contemporary processors, input, output and storage devices
Question text

6 The Little Man Computer (LMC) instruction set can be used to write programs using assembly language. (a) State the type of translator that is used to convert assembly language into machine readable code. [1] (b) Fig. 3 shows assembly code written using the LMC instruction set. INP STA X SUB Y BRP jump LDA X STA Z HLT jump LDA Y STA Z HLT X DAT 0 Y DAT 5 Z DAT 0 Fig. 3 (i) Tick one box to indicate the programming construct that is not used in Fig. 3. Sequence Selection Iteration [1] (ii) When the program is run, 7 is input by the user. State the value that will be in the memory location Z when the program has run with this input. [1] (iii) Write an equivalent version of the LMC assembly code shown in Fig. 3 for a procedural programming language. You should write your code using pseudocode or program code. [4] (c) CPUs can be designed to take a Complex Instruction Set Computer (CISC) or a Reduced Instruction Set Computer (RISC) approach. Describe one difference between CISC and RISC. [2]