AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Classification of programming languages and translators: compiler
A compiler is a translator that takes a whole program written in a high-level language and converts it into machine code before the program is run.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 17 of 19
Study notes
From the checked teaching notes for this specification point.
The idea
A compiler is a translator that takes a whole program written in a high-level language and converts it into machine code before the program is run. The output is a separate file, often an executable, that can be run without the compiler being present. Because translation happens once, the compiled program usually runs faster than an interpreted one, and the compiler can report a list of errors across the whole source before any execution. The trade-off is that every change requires recompiling, which slows development. A learner should recognise a description such as 'translates the entire program into machine code and produces an executable file' as a compiler, and distinguish it from an interpreter, which translates and runs code line by line.
What earns the marks
- Identifies a compiler as a translator that converts a whole high-level program into machine code before execution.
- States that the compiler produces a separate machine-code or executable file as its output.
- Explains that the compiled program can be run without the compiler being present.
- Recognises that compiled programs typically run faster because translation happens once, in advance.
- Notes that a compiler can report errors across the whole program before it is run.
- Distinguishes a compiler from an interpreter, which translates and executes one line at a time.
Common mistakes and how to put them right
Confusing a compiler with an interpreter.
Put it right: A compiler translates the whole program before it runs, whereas an interpreter translates and runs line by line.
Thinking compiled code needs the compiler at run time.
Put it right: The output is a separate machine-code file that runs independently.
Believing a compiler executes the program.
Put it right: It only translates; the resulting machine code is run afterwards.
Assuming compilation is always quicker for development.
Put it right: Each change requires recompiling, which can slow the edit-run cycle.
Exam tips
- Memorise a short definition of compiler and a matching contrast with interpreter so you can select the right term from a description.
- When a scenario mentions producing an executable file or translating the whole program first, link it explicitly to a compiler.
- If asked for a drawback, mention that the program must be recompiled after every change.
Try the lesson
The start of the Classification of programming languages and translators: compiler lesson, made from checked teaching notes for this specification point.
Have a go first
A company wants to sell software as a single file that users can run without installing a translator. Which type of translator produces this?
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Classification of programming languages and translators: compiler
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge