A program written in a high-level language can be run on computers that have different processors.
Explain one reason why this is possible.
Mark scheme
Award up to two marks for a linked explanation such as:
- The same source code can be used on different processors (1) because a compiler/interpreter for each processor translates it into that processor's machine code/instructions (1)
- The program is machine/processor independent (1) because the code is translated into the machine code/instructions of each processor it is run on (1)
- A different compiler/interpreter is used for each type of processor (1) so the same source code can be translated into each processor's machine code/instructions (1)
- The program can be moved/copied to a computer with a different processor (1) because a compiler/interpreter that produces code for that processor exists (1)
For both marks, the expansion must follow/associate with the statement.
Do not accept 'it is portable' without a linked reason about translation for different processors.
Do not accept 'it is easier to use/read/write' on its own without a linked reason about translation/processors.
Do not accept 'it is not written in binary'/'it is not machine code'/'it is not written in assembly language' as the reason without saying that the code is translated into each processor's machine code/instructions.
Do not accept the misconception that the program runs directly on any processor without being translated.
Example answers and how they were marked
The same source code can be used on different processors because a compiler for each type of processor translates it into that processor's machine code.
Why: Linked point (1) that the same source code is used and reason (1) that a compiler translates it into each processor's machine code.
It is machine independent because it is not written in binary.
Why: Point (1) that the program is machine independent, but the reason given does not say that the code is translated for each processor's machine code/instructions.
Because it is easier to use than machine code.
Why: No point about translation or different processors; 'easier to use' is not accepted without a linked reason about translation/processors.