Question 1

OCR Computer Science June 2024 Computer systems (H446-01)A level23 marks

On the specification

(a)
1.1 The characteristics of contemporary processors, input, output and storage devices
(b)
1.1 The characteristics of contemporary processors, input, output and storage devices
(c)
1.1 The characteristics of contemporary processors, input, output and storage devices
(d)(i)
1.2 Software and software development
(d)(ii)
1.2 Software and software development
(e)
1.2 Software and software development
(f)
1.2 Software and software development
(g)
1.1 The characteristics of contemporary processors, input, output and storage devices
Question text

1 The stored program concept uses the Fetch-Decode-Execute cycle to get the next instruction from memory and then execute it. (a) Describe what happens during the fetch stage of the Fetch-Decode-Execute cycle. You should state the different registers and buses that are used in your answer. [4] (b) One of the instructions that may be fetched and executed as part of this cycle is a branch instruction. State the name of the register that would be altered in the execute phase during a branch instruction. [1] (c) Three ways of improving the performance of a CPU are increasing the clock speed, adding more cores and using pipelining. Explain how pipelining improves the performance of a CPU. [3] (d) The Fibonacci sequence is a series of numbers. It starts with the number 0 and then 1. Each number after that is a sum of the two numbers before it. The first seven numbers in the series are: 0 1 1 (i.e. 1 + 0) 2 (i.e. 1 + 1) 3 (i.e. 1 + 2) 5 (i.e. 2 + 3) 8 (i.e. 3 + 5) Orla has written some code to show the first five numbers in the Fibonacci sequence (0,1,1,2,3) using the Little Man Computer (LMC) instruction set. The LMC code that Orla has written contains an error. START LDA MAX BRZ END LDA A OUT ADD B STA B LDA B STA A LDA MAX SUB ONE STA MAX BRA START END HLT A DAT 0 B DAT 1 MAX DAT 5 ONE DAT 1 (i) State the five outputs that Orla’s code would give. Output 1 Output 2 Output 3 Output 4 Output 5 [3] (ii) Orla has rewritten her LMC code to fix the error and added an additional DAT. Complete the LMC code to output the first five correct numbers in the Fibonacci sequence (0,1,1,2,3). START LDA MAX BRZ END LDA A OUT STA TEMP ADD B STA B STA A LDA MAX SUB ONE STA MAX BRA START END HLT A DAT 0 B DAT 1 DAT 0 MAX DAT 5 ONE DAT 1 [4] (e) In Orla’s LMC code, she used direct memory addressing. Give three other modes of memory addressing. 1 2 3 [3] (f) Since the development of high level languages, the use of assembly languages has reduced. Give two reasons why in some circumstances programmers will choose to write code in assembly language. 1 2 [2] (g) The performance of a computer system can be improved by adding more RAM. Explain why adding more RAM will improve the performance of a computer system. [3]