Question 1 Report
Fig. 1 shows part of the route used by a robotics club to turn a program into instructions for a small computer. The club writes the source code in a language with English-like commands. The robot has limited memory and can only run binary machine-code instructions. The compiler is run before the robot is taken to a competition.
(a) State the classification of the language used to write the source code. [1]
(b) Give one reason why the robot cannot use the source code directly. [1]
(c) State what is produced by the compiler. [1]
(d) Give one advantage of using a compiler for this robot program. [1]
(a) The source language is a high-level language [1], as it uses English-like commands.
(b) The robot cannot use the source code directly because its processor understands only machine-code, binary instructions [1].
(c) The compiler produces object code, machine code, or executable code [1].
(d) A compiled robot program can run without the compiler being present [1]. It can also run faster than interpreted code, which is useful when the robot is away from the development computer.
Everything you need to excel in your exams