Five statements about interpreters and compilers are shown in the table below. Study each statement. Tick (✔) to show whether the statement refers to an interpreter or to a compiler. Statement creates an executable file that runs directly on the computer more likely to crash the computer since the machine code produced runs directly on the processor easier to debug since each line of code is analysed and checked before being executed slow speed of execution of program loops it is more difficult to modify the executable code, since it is in machine code format
- (a)Five statements about interpreters and compilers are shown in the table below. Study each statement. Tick (✔) to show whether the statement refers to an interpreter or to a compiler. Statement creates an executable file that runs directly on the computer more likely to crash the computer since the machine code produced runs directly on the processor easier to debug since each line of code is analysed and checked before being executed slow speed of execution of program loops it is more difficult to modify the executable code, since it is in machine code format[5]
- (b)State why a compiler or an interpreter is needed when running a high-level program on a computer.[1]
- (c)Give one benefit of writing a program in a high-level language.[1]
- (d)Give one benefit of writing a program in a low-level language.[1]
- (e)Study the following three sections of code. A: 101 0 1 1 0 1 1 1 0 0 1 1 1 0 10 1 1 0 1 1 1 B: LDA X INC X STA Y C: FOR X ← 1 TO 10 READ n ENDFOR Identify, using the letters A, B or C, which of the above codes is an example of assembly code, high-level language code or machine code: Assembly code High-level language code Machine code[2]
Mark scheme
Marking points from the official mark scheme (May/June 2015). The mark or mark type is shown in brackets.
- [5] (a) 1 mark per correctly placed tick Statement interpreter compiler creates an executable file that runs directly on the computer ✔ more likely to crash the computer since the machine code produced runs directly on the processor ✔ easier to debug since each line of code is analysed and checked before being executed ✔ slow speed of execution of program loops ✔ it is more difficult to modify the code since the executable code is now in machine code format ✔
- [1] (b) Any one from: – code is required to be converted into machine code/binary – code needs to be produced that can be understood by the computer
- [1] (c) Any one from: – close to English/native/human language – easier/faster to correct errors/read/write – works on many different machines/operating systems (portable)
- [1] (d) Any one from: – work directly on registers/CPU – more control over what happens in computer – can use machine specific functions
- [2] (e) 1 mark per correct letter, maximum 2 marks Assembly code: B High-level language code: C Machine code: A
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →