A programmer writes a program in a high-level language.
Describe why the program can be run on computers with different processors.
Mark scheme
Award up to two marks for a linked description such as:
- The same source code can be run on different types/makes of processor (1) with few or no changes being made to the program (1)
- A compiler/interpreter is available for each type of processor (1) to translate the source code into the machine code for that processor (1)
- The statements are not tied to one processor's instruction set (1) so the program is portable between different computers (1)
Do not accept 'it is translated by a compiler' on its own.
Do not accept 'the program does not need to be translated' or 'it is easier to use'.
Example answers and how they were marked
A compiler exists for each type of processor (1) to translate the source code into the machine code for that processor (1).
Why: Names the translator for each processor (1) and links it to producing that processor's machine code (1).
The same program can be run on different computers.
Why: States that the same code runs on different machines (1) but does not develop it by saying that few or no changes are needed.
Because it is translated by a compiler.
Why: A compiler on its own does not explain machine independence; the answer does not say that a translator exists for each type of processor.