Software · 4 question types
Past paper frequency (2018 to 2024)
This topic accounts for approximately 4% of your exam marks.
Compiler vs interpreter differences are a recurring 3-mark question.
A low-level language is one where each instruction maps directly or very closely to a single machine-code instruction, and where the programmer has direct control over the computer's hardware (registers, memory addresses, processor instructions).
There are two low-level languages on the IGCSE syllabus: machine code and assembly language.
Machine code is the raw binary language the CPU runs directly. Every instruction is a string of 1s and 0s that matches one specific operation in the CPU's instruction set.
A machine-code instruction might look like 10110111 00000101, which is meaningless to a human reader, but the CPU can execute it without any translation step.
Assembly language is a low-level language where each binary machine-code instruction is replaced with a short, human-readable abbreviation called a mnemonic.
Typical assembly mnemonics:
| Mnemonic | Meaning |
|---|---|
| LDA | Load: copy a value from memory into the accumulator |
| STA | Store: copy the accumulator's value into a memory location |
| ADD | Add a value to the accumulator |
| SUB | Subtract a value from the accumulator |
| JMP | Jump to a different instruction |
| HLT | Halt the program |
Assembly is far easier for humans to write than raw machine code, but it is still one-to-one with machine code: each assembly instruction translates to exactly one machine-code instruction.
Before assembly can run, it must be translated into machine code by a piece of software called an assembler (covered in section 4).
Modern programmers rarely write entire programs in assembly, but low-level code is still used for specific situations:
| Advantages | Disadvantages |
|---|---|
| Direct control of memory, registers and hardware | Hard to read and write for humans |
| Efficient: small memory footprint, very fast execution | Machine-dependent: code only runs on one CPU architecture |
| Predictable timing (useful in real-time systems) | Easy to make mistakes that crash the system |
| Slow to develop in compared to high-level languages |