- Assembly language and machine code
Mnemonics make machine code readable; an assembler translates between them.
A processor can only execute machine code — instructions written in binary. Writing pure binary by hand is slow and error-prone, so programmers use assembly language instead.
Assembly language replaces binary instructions with short, memorable mnemonics:
| Machine code (binary) | Assembly (mnemonic) | Meaning |
|---|---|---|
| 0010 … | LDD 200 | load contents of address 200 |
| 0001 … | ADD #5 | add the value 5 |
| 1100 … | JMP 30 | jump to address 30 |
Key facts examiners want:
- Assembly language is low-level (close to the hardware), not high-level.
- There is broadly a one-to-one relationship between an assembly instruction and a machine-code instruction.
- Assembly must be translated by an assembler before it can run; machine code runs directly.
- Assembly lets you use labels (e.g.
loop:) and symbolic names instead of absolute binary addresses, which makes programs far easier to read and maintain.
- Machine code = binary; the CPU runs it directly.
- Assembly language = mnemonics, low-level, one-to-one with machine code.
- An assembler translates assembly → machine code.
- Assembly allows labels/symbolic addresses; machine code uses absolute binary addresses.