Question 2
AQA Computer Science June 2019 Paper 1GCSE7 marks
On the specification
- 2.1
- 3.4 Computer systems
- 2.2
- 3.4 Computer systems
- 2.3
- 3.4 Computer systems
Question text
2 The three examples of code shown in Figure 2 are all equivalent to one another. box Figure 2 Example 1 Example 2 Example 3 a ← 4 MOV R0, #4 1001 0000 0100 0000 b ← 3 MOV R1, #3 1001 0001 0011 0000 IF a = b THEN CMP R0, R1 0100 0000 0001 0000 c ← a + b BNE end 1010 0101 0000 0000 ENDIF ADD R2, R0, R1 1100 0010 0000 0001 end: 1111 0000 0000 0000 HLT 2.1 Shade one lozenge to show the statement that is true about Figure 2. [1 mark] A None of the examples of code is in a low-level language. B Only one of the examples of code is in a low-level language. C Only two of the examples of code are in low-level languages. D All three of the examples of code are in low-level languages. 2.2 Explain why a developer, who is good at both low-level and high-level programming, would normally use high-level languages when writing programs. [4 marks] 2.3 Statements A and B refer to two different types of program translator. Statement A: This type of translator can convert a high-level language program into machine code. The source code is analysed fully during the translation process. The result of this translation can be saved, meaning the translation process does not need to be repeated. Statement B: This type of translator was used to convert the code in Example 2 to the code in Example 3 in Figure 2. State the type of program translators referred to in statements A and B. [2 marks] Statement A: Statement B: