AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Understand when it would be appropriate to use each type of translator.

    Full specification wording

    Classification of programming languages and translators: Understand when it would be appropriate to use each type of translator.

    A translator converts source code into a form the processor can execute, and the three types suit different situations.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 19 of 19

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    A translator converts source code into a form the processor can execute, and the three types suit different situations. A compiler translates the whole program in one go before it runs, producing an executable file; this suits finished software distributed to users who do not have the source code, and it runs quickly because translation is already done. An interpreter translates and executes one statement at a time, stopping at the first error; this suits development and debugging because errors are reported line by line and code can be tested without a full build. An assembler translates assembly language, with its mnemonics, into machine code, so it is chosen when writing low-level code close to the hardware. Choosing the right translator means matching these features to the task: distribution, debugging, speed of execution or low-level control.

    What earns the marks

    • A compiler translates the entire source program before execution and produces an executable, so it suits software being distributed to end users without source code.
    • An interpreter translates and runs code one statement at a time, halting at the first error, so it suits testing and debugging during development.
    • An assembler converts assembly language mnemonics into machine code, so it is appropriate for low-level programs written close to the hardware.
    • Compiled code generally executes faster because translation is completed before running, whereas interpreted code is re-translated as it runs.
    • Selecting a translator requires matching its behaviour (whole-program build, line-by-line execution, or mnemonic conversion) to the purpose of the task.

    Common mistakes and how to put them right

    • Thinking an interpreter produces a standalone executable file.

      Put it right: An interpreter runs code statement by statement and does not create a separate executable in the way a compiler does.

    • Believing a compiler reports errors line by line as the program runs.

      Put it right: A compiler translates the whole program and reports errors before execution, so it does not stop mid-run at the first error.

    • Confusing an assembler with a compiler for high-level languages.

      Put it right: An assembler specifically translates assembly language mnemonics into machine code.

    Exam tips

    • Link each translator to a concrete scenario, such as distributing finished software (compiler) or debugging during development (interpreter).
    • State the mechanism, not just the name: whole-program translation versus statement-by-statement execution versus mnemonic conversion.
    • When asked which is appropriate, justify the choice by referring to speed of execution, error reporting or level of the language.

    Try the lesson

    The start of the Classification of programming languages and translators: Understand when it would be appropriate to use each type of translator. lesson, made from checked teaching notes for this specification point.

    Have a go first

    A student wants to run a Python program one line at a time and see the result of each line immediately while testing. Which translator is most appropriate?

    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.

    Carry on with the full lesson

    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: Understand when it would be appropriate to use each type of translator.

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge