Question 6

OCR Computer Science November 2021 Computer systems (H446-01)A level24 marks

On the specification

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

6 A program written using the Little Man Computer instruction set is shown in Fig. 1. INP STA numone INP STA numtwo main LDA numone SUB numtwo BRP pos notpos LDA count OUT LDA numone OUT HLT pos STA numone LDA count ADD one STA count BRA main numone DAT numtwo DAT one DAT 1 count DAT 0 Fig. 1 (a) Various registers are used when the program above is executed. (i) State what is meant by the term ‘register’. [2] (ii) Explain how the accumulator is used when the line BRP pos is executed. [2] (b) Complete the table below to show the output(s) from this program given the inputs. Inputs Output(s) 12, 5 18, 2 16, 4 3, 7 [4] (c) Write an algorithm using pseudocode that has the same functionality as the code in Fig. 1. [4] (d)* In assembly language, different modes of addressing memory can be used. Discuss the different modes used. You should include: • How the operand value is determined • What an operand of 27 would refer to in that mode • The reasons for requiring multiple modes of addressing [12]