IGCSE Computer Science Worksheet
Topic: Language Translators and Programming Languages
Grade: 10
Duration: 45 minutes
Part 1: Research & Comparison Table
Fill in the table below based on your research.
Feature Compiler Interpreter High-Level Low-Level Assembly
Language Language Language
Definition Translates Translates Programmin Programmin Low-level
entire source code g language g language language
source code line by line close to close to using
into at runtime human machine mnemonics
machine language code for machine
code before (machine/as instructions
execution sembly)
Translation Converts Converts Translated Translated Requires an
Method whole and executes using using assembler to
program one line at a compiler or assembler or translate
into object time interpreter directly into machine
code at once executed by code
CPU
Error Stops and Syntax/logic Errors are Assembler
Reporting shows error errors hardware- reports
Shows all immediately identified by related, syntax
errors (line by line) translators difficult to errors
together debug during
after translation
compilatio
n
Advantages Fast Easy to Easy to More control Gives direct
execution debug, runs learn, over control of
after instantly portable, hardware, hardware,
compilation programmer efficient more
(code -friendly execution readable
already than pure
translated) machine
code
Disadvantag Slower Slower Hard to Still
es execution, execution understand complex, not
Slower since code is compared to and portable,
initial translated low-level, maintain, machine-
compilatio every run less not portable dependent
n; hardware
program control
must be
recompile
d after
changes
Examples C, C++, Java Python, Python, Java, Machine Assembly
(compiled JavaScript, C++ code, for Intel x86,
languages) Ruby Assembly ARM
assembly
Part 2: Exam-Style Questions
1. Describe how a compiler translates a high-level language program into machine code.
Include how errors are handled. (4 marks)
The compiler translates the whole program into machine code in one go.
It generates an object file or executable.
If there are errors, the compiler lists them all after compilation.
The programmer must correct errors before recompilation.
2. Explain two advantages and two disadvantages of using an interpreter instead of a
compiler. (4 marks)
Ads:
Errors are shown immediately, making debugging easier.
No need to wait for compilation — program runs instantly.
Dis:
Program runs slower because it is translated line by line.
The source code is needed every time the program is run.
3. Explain the difference between a high-level language and a low-level language. Include
one advantage and one disadvantage of each. (4 marks)
A high-level language is closer to human language, while a low-level language is
closer to machine code.
High-level advantage: Easier to learn and portable.
High-level disadvantage: Slower and less efficient than low-level.
Low-level advantage: More control of hardware and faster execution.
Low-level disadvantage: Hard to learn, not portable.
4. Explain what is meant by assembly language and describe the role of an assembler. (3
marks)
Assembly language is a low-level language that uses mnemonics to represent
machine instructions.
It is easier to read than binary machine code.
An assembler translates assembly code into machine code so the CPU can execute it.
Part 3: Peer Review Notes
Swap your answers with another pair and use the space below to write feedback.
What did they do well?
What could be improved?