High-level and low-level languages
Tap each language to see the same job written three ways.
Key differences
High-level
- Close to English
- Easy to read, write and debug
- Portable: works on many computers
- One statement = many machine code instructions
Low-level
- Close to machine code
- Hard to read, write and debug
- Machine-specific: one type of CPU
- Direct control of hardware, faster, less memory
ActivitySort it: high-level or low-level?
ActivityJob Centre: which type of language does the job need?
Why do we need a translator?
The CPU only understands machine code.
ActivityPut the steps in order
ActivityFill the gaps
Compiler vs Interpreter
Both translate source code into machine code. They do it in different ways.
See how each one works
Watch what happens with two mistakes in the code
The differences
| Compiler | Interpreter | |
|---|---|---|
| Translates | The whole program in one go | One line at a time |
| Executable file? | Yes | No |
| Translator needed to run it? | No | Yes, every time |
| Errors | All reported at the end | Stops at the first error |
ActivityPredict the run
ActivitySort it: compiler or interpreter?
Benefits and drawbacks
Tap a translator to see what it is good at, and where it falls short.
ActivityWhich translator would you use?
Exam questions
Type your answer, then mark it against the mark scheme.
Exam practice
Answer 10 questions correctly to finish this step.