GCSE · Computer Science · Eduqas · Spec C500QS

Appropriate use of translators

Last night you re-ran your game every two minutes to squash bugs. Tonight you're sending it to a friend. Same program, different job, and not the same best translator.

Computer Science · Translators

Which translator would you choose?

Which translator is the best fit for each situation? Commit to an answer first. The reason appears afterwards.

Still to sort

Compiler (0)

Translates the whole high-level program into machine code before it runs.

Where the line is: The translating is done once, in advance. What goes out to users is the executable.

Interpreter (0)

Translates and runs a high-level program one statement at a time, every time it runs.

Where the line is: The translating happens during every run, so the interpreter and the source code must be there each time.

Assembler (0)

Translates assembly language into machine code, generally one instruction to one.

Where the line is: Only for code that is already written in assembly language, never a high-level language.

9 of 9 still to sort.

Have a go before you read the reasons. Pick a situation, then pick a translator.

Exam line: Name the translator, then link one feature of it to the requirement in the situation.
Watch out: Do not choose by "which is fastest". Choose the translator whose feature meets what the situation asks for.

Computer Science · Translators

What does each translator actually do?

Three translators, three different jobs. Before you choose between them, check you have each job straight.

Which of these is closest to what you think right now?
How sure are you?

Exam line: The three purposes are different: say when the translating happens and what language goes in.

Compiler or interpreter?

CompilervsInterpreter

Five differences. Speed first, because it is the one people mix up most.

Focus

Speed of the finished program

Compiler

Usually runs faster

Interpreter

Usually runs more slowly

The insight

A compiler translates everything once, in advance. An interpreter translates each statement while the program runs, every time it runs.

What the user needs to run it

Compiler

The executable only. No compiler or source code needed

Interpreter

The interpreter and the source code, on the machine every time

Protecting the source code

Compiler

Hidden from users, so harder to copy or alter

Interpreter

Exposed to users

Portability

Compiler

Machine code for one processor type or platform. Recompile for a different one

Interpreter

Source code runs on any platform that has a suitable interpreter

During development

Compiler

The whole program is translated again after every change, before it can run

Interpreter

Changed code runs straight away, and it stops at the statement with the problem

Computer Science · Translators

Watch an interpreter hit a problem

Picture an interpreter running this program, which should print a total. Press Run, watch which lines get as far as running, then choose a fix for the line it stops at.

Python
  1. print("Starting up")
  2. price = 12
  3. print("Price is", price)
  4. total = price * quantity
  5. print("Total:", total)

Python is only the example here. Nothing is run on this page: every message and output was taken from a real run of this exact code. Other languages word their messages differently.

Computer Science · Translators

Choose it, then justify it

A company has finished a program written in a high-level language. It will be sold to customers, it must run as fast as it can, and the company does not want customers to be able to read the code. Which translator should the company use? Justify your choice. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

Exam line: Name the translator, then link a feature to the requirement in the situation.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

No translator is best at everything. Pick the one that fits the situation, then say why.

What you need to know

  • Translators convert the code you write into something the processor can run: compiler, interpreter and assembler.
  • A compiler translates the whole high-level program into machine code before it runs, giving an executable.
  • An interpreter translates and runs a high-level program one statement at a time, every time. No separate executable file.
  • An assembler translates assembly language (mnemonics) into machine code, generally one instruction to one.
  • Have a goSam says: "I wrote my game in a high-level language, so I'll run it through an assembler." Which translators could Sam actually use?

    A compiler or an interpreter.

    An assembler only translates assembly language into machine code. High-level programs go through a compiler or an interpreter.

  • Speed: a compiled program usually runs faster, because all its translating was done once in advance.
  • Distribution: a compiled executable runs without the compiler or source code. An interpreted program needs the interpreter and the source, every run.
  • Protection: a compiled executable keeps the source code hidden, so it is harder to copy or alter. Interpreted programs expose it.
  • Have a goYou're shipping an app and don't want customers reading or tweaking your source code. Compiled executable or interpreted program?

    A compiled executable.

    Only the executable goes out, so the source code stays hidden. An interpreted program is handed over as source code.

  • Portability: compiled machine code is specific to one processor type or platform. Interpreted source can run on any platform with a suitable interpreter.
  • Development: compiling must be repeated after every change. An interpreter runs changed code straight away and stops at the problem statement.
  • Have a goA tester changes one line and re-runs 20 times in ten minutes. Which translator makes them wait to translate the whole program again each time?

    A compiler.

    A compiled program has to be translated again after every change before it can run. An interpreter runs the changed code straight away.

  • Choose by situation: compiler to ship finished code, interpreter while developing or across platforms, assembler for assembly language.

The big picture

A compiler, an interpreter and an assembler all translate code, but they suit different jobs. A compiler suits a finished program that must run fast, go out to users and keep its source code hidden. An interpreter suits writing, testing and debugging, and running the same source code on different platforms. An assembler suits code written in assembly language, such as where direct control of the hardware, speed or very little memory matters. To choose, link one feature of the translator to the requirement in the situation.

Key points

1Compiler: translates the whole high-level program into machine code before it runs, and usually gives faster execution.
2Interpreter: translates and runs one statement at a time, every run, so changed code runs straight away and it stops at the statement where it meets a problem.
3Assembler: translates assembly language into machine code, generally one assembly instruction to one machine code instruction.
4A compiler suits a finished program that is to be distributed, must run as fast as possible and needs its source code protected.
5An interpreter suits a program being written, tested and debugged, and the same source code running on different platforms.
6An assembler suits a program written in assembly language, for example where direct hardware control is needed or code must be very fast or use very little memory, such as on small embedded devices.
7Justify a choice by linking a specific feature of the translator to the requirement in the situation.

Worked example

Problem

A developer is writing a program in a high-level language and re-runs it dozens of times a day to hunt for bugs. When it is finished, it will be sold to the public. Which translator suits each stage, and why?

⚠ Watch out

Thinking the compiler is simply better because it is faster. Speed only decides the answer if the situation asks for it. While a program is being written, tested and debugged, or when the same source must run on different platforms, an interpreter is the better choice.

🧠

Memory hook

Ship it? Compile it. Still building it? Interpret it. Written in assembly language? Assemble it.

✓

Check yourself

Without looking back, make up one situation for each translator: one for a compiler, one for an interpreter, one for an assembler. For each, say which feature of the translator meets which requirement.

Flashcards

(12)
What does a compiler do?
Translates the whole of a high-level language program into machine code (an executable or object file) before the program is run.
What does an interpreter do?
Translates and executes a high-level language program one statement at a time, each time it is run, without producing a separate executable file.
What does an assembler do?
Translates a program written in assembly language (mnemonics) into machine code, generally one assembly instruction to one machine code instruction.
Which usually runs faster, a compiled or an interpreted program? Why?
Compiled. All the translating is done once in advance. An interpreted program is translated statement by statement while it runs, every time it runs.
What do users need to run a compiled program, and what do they need for an interpreted one?
Compiled: just the executable, with no compiler or source code. Interpreted: the interpreter and the source code, on the machine every time.
How does distributing a compiled executable protect the code?
It keeps the source code hidden from users, so it is harder to copy or alter. An interpreted program exposes the source code.
Why must compiled code be recompiled for a different platform?
Machine code is specific to the processor type or platform it was compiled for. Interpreted source can run on any platform with a suitable interpreter.
Why does an interpreter make testing and debugging quicker?
Changed code can run straight away, with no need to translate the whole program again, and it stops at the statement where it meets a problem.
When is a compiler the suitable choice?
When a finished program is to be distributed to users, when it must run as fast as possible and when the source code should be protected.
When is an interpreter the suitable choice?
While a program is being written, tested and debugged, and when the same source code needs to run on different platforms.
When is an assembler the suitable choice?
When a program is written in assembly language, for example where direct control of the hardware is needed or code must be very fast or use very little memory, such as on small embedded devices.
What makes a justification for choosing a translator?
Linking a specific feature of the translator (speed, independence from the translator, code protection, portability, ease of debugging) to the requirement in the situation.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.