💻 Paper 1 · Topic 4: Software
4.2 Programming Languages & Translators
Cambridge IGCSE Computer Science 0478 · ~13 min read · ⭐ Pro

Levels of Programming Language

Machine Code (Low-level)

Binary instructions (0s and 1s) that the CPU can execute directly. Machine code is specific to each CPU architecture. Very fast to run, but difficult to write and understand.

10110000 01100001 ← Machine code (binary)

Assembly Language (Low-level)

Uses mnemonics (short text codes) to represent machine code instructions. Easier to read than binary, but still tied to the specific CPU architecture. Must be converted to machine code by an assembler.

MOV AX, 5 ← Assembly mnemonic ADD AX, BX

High-level Languages

Written in English-like syntax, close to human language. Portable — can run on different CPUs with the right translator. Examples include Python, Java, C++. Must be converted to machine code by a compiler or interpreter.

total = price + tax ← High-level code print(total)
FeatureLow-level (machine/assembly)High-level
ReadabilityDifficult — binary or mnemonicsEasy — English-like syntax
PortabilityCPU-specific, not portablePortable across different hardware
Execution speedVery fast — directly run by CPUSlower — must be translated first
Use caseDevice drivers, embedded systemsMost general software

Translators

A translator converts source code (written by the programmer) into machine code (executable by the CPU).

Assembler

Translates assembly language into machine code. One-to-one translation (each mnemonic → one machine code instruction).

Compiler

  • Translates the entire high-level program into machine code before execution
  • Output: a standalone executable file (e.g. .exe)
  • Advantages: Fast execution; source code hidden from end-user; no translator needed to run
  • Disadvantages: Compilation takes time; errors not shown until compilation is complete

Interpreter

  • Translates and executes the program one line at a time
  • No standalone executable is created — the interpreter must be present each time
  • Advantages: Easier debugging (errors shown immediately); useful during development
  • Disadvantages: Slower execution than compiled code; source code visible; interpreter needed at runtime
FeatureCompilerInterpreter
TranslationWhole program at onceOne line at a time
SpeedFaster at runtimeSlower at runtime
ErrorsAll shown after full compilationShown immediately at error line
OutputExecutable file createdNo executable created
Needed at runtime?No — runs independentlyYes — interpreter required

Integrated Development Environment (IDE)

An IDE is software that provides tools to help write, test and debug programs. IDEs typically include:

  • Code editor — with syntax highlighting and auto-complete
  • Run/build tools — to compile/interpret and run the program
  • Debugger — allows stepping through code line by line, inspecting variables
  • Error detection — highlights syntax errors in real time
  • Auto-completion — suggests code and fills in keywords
Exam tip: The compiler vs interpreter question is very common. Remember: compiler = whole program at once, produces executable, faster at runtime; interpreter = line by line, no executable, easier to debug. For translators, also know that an assembler converts assembly language specifically.
⚠️ Common Mistakes
  • Saying a compiler is "better" than an interpreter — they have different advantages for different situations
  • Forgetting that an interpreter must be present every time the program runs
  • Confusing assembly language with machine code — they are different; assembly uses mnemonics
Video coming soon
Click slide or press arrow keys to navigate
✍️

Worksheet — Languages & Translators

5 questions · 13 marks

Q1State two differences between low-level and high-level programming languages. [2]
✅ Mark scheme
Any two: High-level is easier to read/write; high-level is portable (works on different CPUs); low-level is faster to execute; high-level must be translated first [2]
Q2Describe how a compiler differs from an interpreter in the way it translates a program. [4]
✅ Mark scheme
A compiler translates the entire program at once before execution [1]; producing a standalone executable file [1]; An interpreter translates one line at a time during execution [1]; and does not produce a standalone executable [1]
Q3Give two advantages of using an interpreter during software development. [2]
✅ Mark scheme
Any two: Errors are shown immediately at the line where they occur [1]; easier to debug and test code during development [1]; can run and test partial programs without waiting for full compilation [1]
Q4Describe the role of an assembler. [2]
✅ Mark scheme
An assembler translates assembly language code (written using mnemonics) [1] into machine code (binary) that the CPU can execute directly [1]
Q5State three features of an IDE that help programmers write and test code. [3]
✅ Mark scheme
Any three: Syntax highlighting [1]; auto-completion/code suggestions [1]; debugger / step-through execution [1]; error detection/highlighting [1]; built-in run/compile button [1]
Quiz — Languages & Translators
Q 1 of 8
Score
/ 8
Click to reveal
TermDefinition
🎯

Mini Test — Languages & Translators

10 minutes · mixed marks

← 4.1 Software & OS Topic 4: Software Next: 5.1 Internet & WWW →
🔒
Pro Content
Upgrade to access all lessons.
£7.99/month
or £59/year
Subscribe now →