AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Assemblers and compilers translate their input into machine code directly
Full specification wording
Classification of programming languages and translators: assemblers and compilers translate their input into machine code directly
An assembler takes assembly language (low-level, mnemonic-based) as input and translates it directly into machine code, producing an object file the processor can run.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 13 of 19
Study notes
From the checked teaching notes for this specification point.
The idea
An assembler takes assembly language (low-level, mnemonic-based) as input and translates it directly into machine code, producing an object file the processor can run. A compiler takes a high-level language program as input and translates the whole program into machine code in one go, also producing an object file before execution. The key point is 'directly': both produce machine code without a separate interpretation step at run time. Contrast this with an interpreter, which translates and executes line by line and does not produce a standalone machine-code file. So the shared feature is that assembler and compiler output is machine code.
What earns the marks
- An assembler translates assembly language into machine code.
- A compiler translates a high-level language program into machine code.
- An interpreter differs because it translates and executes line by line rather than producing machine code directly.
- Machine code consists of binary instructions the processor can execute.
Common mistakes and how to put them right
Saying a compiler interprets the program line by line.
Put it right: A compiler translates the whole program into machine code before it runs.
Confusing an assembler with an interpreter.
Put it right: An assembler converts assembly language into machine code; an interpreter executes source code line by line.
Claiming a compiler produces high-level source code.
Put it right: Its output is machine code.
Exam tips
- State the input and the output for each translator to earn clear marks.
- Use the word 'directly' to distinguish assembler and compiler from interpreter.
- Link machine code to binary instructions the CPU can execute.
Try the lesson
The start of the Classification of programming languages and translators: assemblers and compilers translate their input into machine code directly lesson, made from checked teaching notes for this specification point.
Have a go first
Which of the following statements about assemblers and compilers is true?
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: assemblers and compilers translate their input into machine code directly
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