← IGCSE Computer Science Paper 1

Why translators are needed

Software that converts high-level or assembly code into machine code, because the CPU can only run machine code. Types: assembler, compiler, interpreter.

Understanding Why translators are needed in IGCSE Computer Science Paper 1

What it does: Each of the three translators takes a particular kind of source code in and gives machine code out. The assembler handles assembly language. The reason is that the CPU can only run machine code. It is not about comments or how the code looks. Programs written in other languages must be translated into machine code before the CPU can run them.

Common mistakes: Python is a high-level language, so it is translated by a compiler or an interpreter. An assembler only translates assembly language. The line should be translator ← 'interpreter'. Assembly language is translated into machine code by an assembler, not a compiler. The line should be translator ← 'assembler'.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 430–439) and word search (Modules 419–439).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which statement is correct about what a CPU can run directly?
The CPU can run Python source code directlyThe CPU can only run machine code
Matches
The CPU runs Python source code directly, so no translator is needed
↓
The CPU can only run machine code. High-level source code such as Python must be translated into machine code first.
Applying
Meanings
Term
translator
Meaning
Software that converts high-level or assembly code into machine code, because the CPU can only run machine code. Types: assembler, compiler, interpreter.
Practice
source_code ← "high-level program"
Testing
Gaps
source code -> -> machine code
Check Answer
Spots
1language ← 'Python'
2translator ← 'assembler'

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Snow Leopard' badge — Silent Debugger, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which statement is correct about what a CPU can run directly?
A. The CPU can only run machine code ✓
B. The CPU can run Python source code directly
A CPU only understands machine code (binary instructions). Source code in other languages must be translated first.
2. What is the job of a translator?
A. Convert machine code into a faster CPU
B. Convert source code into machine code ✓
A translator is software that takes source code in and gives machine code out, so the CPU can run it.
3. Which list contains only types of translator?
A. Assembler, compiler, interpreter ✓
B. Assembler, compiler, spreadsheet
The three translators in the syllabus are the assembler, the compiler and the interpreter. A spreadsheet is application software, not a translator.
4. Which translator is used for assembly language?
A. Assembler ✓
B. Interpreter
An assembler converts assembly language mnemonics into machine code. Compilers and interpreters are used for high-level languages.
5. A program is written in a high-level language. Which translators could be used?
A. Only an assembler
B. A compiler or an interpreter ✓
High-level code is translated by a compiler or an interpreter. An assembler only works on assembly language.

Match the Pairs

translator → Software that converts a program written in a high-level or assembly language into machine code the CPU can run
machine code → The only language the CPU can run directly, made up of binary instructions
An assembler translates assembly language into machine code → assembly language -> assembler -> machine code
A compiler or interpreter translates a high-level language into machine code → high-level code -> compiler or interpreter -> machine code
The CPU runs Python source code directly, so no translator is needed → The CPU can only run machine code. High-level source code such as Python must be translated into machine code first.
high-level code -> assembler -> machine code → An assembler only translates assembly language. High-level code needs a compiler or an interpreter.

Key Term

translator
Software that converts high-level or assembly code into machine code, because the CPU can only run machine code. Types: assembler, compiler, interpreter.

Fill in the Blanks

1. source code -> translator -> machine code
Hint: Type the name of the software that sits in the middle and converts the code.
2. assembly code -> assembler -> machine code
Hint: Type the translator that is used for assembly language.
3. The CPU can only run machine code
Hint: Type the kind of code that the CPU can run directly.
4. Types: assembler, compiler, interpreter
Hint: Type the missing translator type that converts a whole high-level program into an executable file.
5. input: source code output: machine code
Hint: Type what a translator produces from the source code.

Spot the Error

Question 1
A language ← 'Python'
B translator ← 'assembler'
C output ← 'machine code'
D OUTPUT translator
Line B — Python is a high-level language, so it is translated by a compiler or an interpreter. An assembler only translates assembly language. The line should be translator ← 'interpreter'.
Question 2
A translator ← 'compiler'
B language ← 'assembly'
C output ← 'machine code'
Line A — Assembly language is translated into machine code by an assembler, not a compiler. The line should be translator ← 'assembler'.
Question 3
A source ← 'high-level code'
B translator ← 'compiler'
C output ← translate(source)
D cpu_runs ← 'source code'
Line D — The CPU can only run machine code, so it cannot run source code directly. The line should be cpu_runs ← 'machine code'.
Question 4
A REPEAT
B machine ← translate(line)
C CPU.run(line)
D UNTIL no more lines
Line C — The line of source code must be translated first, and the CPU runs the machine code produced. It should be CPU.run(machine), not CPU.run(line).
Question 5
A source ← 'game.c'
B translator ← 'compiler'
C source ← translator(machine)
D SAVE machine AS 'game.exe'
Line C — A translator takes source code as input and gives machine code as output. The line has them the wrong way round. It should be machine ← translator(source).

Student with a class code? Join your class →