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.
Have a go before you read the reasons. Pick a situation, then pick a translator.
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.
- print("Starting up")
- price = 12
- print("Price is", price)
- total = price * quantity
- 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.
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
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?
What does an interpreter do?
What does an assembler do?
Which usually runs faster, a compiled or an interpreted program? Why?
What do users need to run a compiled program, and what do they need for an interpreted one?
How does distributing a compiled executable protect the code?
Why must compiled code be recompiled for a different platform?
Why does an interpreter make testing and debugging quicker?
When is a compiler the suitable choice?
When is an interpreter the suitable choice?
When is an assembler the suitable choice?
What makes a justification for choosing a translator?
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 postedMore Eduqas GCSE Computer Science topics
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.