- Home
- Lessons
- GCSE & IGCSE Computer Science
- Programming languages and translators
Programming languages and translators
🎬 The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.
CPUs only understand machine code, but people prefer to write in languages like Python. Translators bridge the gap.
Low-level languages
Machine code: binary instructions the CPU runs directly.
Assembly language: short mnemonics such as LDA or ADD, each matching one machine code instruction. It is translated by an assembler.
Low-level code gives direct control of hardware and memory and can be very fast and compact. It is specific to one type of processor and hard to write. Used for device drivers and some embedded systems.
Assembly language: short mnemonics such as LDA or ADD, each matching one machine code instruction. It is translated by an assembler.
Low-level code gives direct control of hardware and memory and can be very fast and compact. It is specific to one type of processor and hard to write. Used for device drivers and some embedded systems.
High-level languages
Languages such as Python, Java and C# use English-like statements.
One statement may become many machine code instructions.
They are easier to write, read and debug, and they are portable: the same code can run on different types of processor once translated.
One statement may become many machine code instructions.
They are easier to write, read and debug, and they are portable: the same code can run on different types of processor once translated.
Compiler or interpreter?
A games company wants to sell its game without sharing its source code. Which translator should it use?
- A compiler produces a standalone executable file.
- Customers can run it without seeing or needing the source code.
Answer: A compiler
Machine code runs directly; assembly is translated by an assembler. High-level languages are easier and portable. Compilers translate everything first into a fast executable; interpreters translate line by line and stop at the first error.
The interactive lesson includes the diagrams for this topic.
Check you have got it
Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.