Which pair are both low-level programming languages?
Machine code and assembly language
Why must a program written in a high-level language be translated before it can run?
A CPU can only execute machine code
Which statement describes what a compiler does?
It translates the whole source code into machine code before the program runs
Which statement describes what an interpreter does?
It translates and runs one line at a time, stopping at an error
A software company is ready to sell a finished game and does not want to give customers the source code. Which translator should it use?
A compiler, because it produces a standalone executable file
A programmer is writing a new program and wants to test each change straight away. Which translator is best?
An interpreter, because each line is translated and run as it is reached
Assembly language uses short words such as ADD instead of binary codes. Which statement about assembly language is correct?
Each instruction matches one machine code instruction
A device driver must control hardware directly and run as fast as possible. Why is a low-level language a suitable choice?
It gives direct control over the hardware and runs very quickly
Which is an advantage of writing a program in a high-level language rather than a low-level language?
The program is easier to read, write and debug
Which is a drawback of using a compiler?
The program must be recompiled after every change
Why can a program written in a high-level language be run on several different types of computer, while a program written in a low-level language cannot?
The source code can be translated separately for each type of processor
A program runs more slowly when it is executed by an interpreter than when the same program has been compiled. Why?
Every line is translated again each time the program is run
A programmer writes a single statement in a high-level language that adds up a list of numbers. What happens to this statement when the program is translated?
It becomes many machine code instructions
A programmer compiles a program that contains three errors. What does the compiler do?
It reports all three errors together and no runnable program is produced
A compiler and an interpreter are both used with programs written in high-level languages. Which job do they both do?
Converting source code into machine code
What is meant by a high-level language?
A programming language close to English and maths, using keywords such as print and if, which must be translated before it can run
Which term describes the binary patterns that a processor can carry out directly without being translated first?
Machine code
What is meant by source code?
The program that a programmer writes in a high-level or low-level language, before it is translated into machine code
Compilers and interpreters are both examples of which type of program?
A translator
We use cookies to enhance your experience. You can manage your preferences or learn more in our Cookie Policy.