Why programs are translated
A processor can only run machine code: binary instructions from its own instruction set. Programs are written in source code, so they must be translated first.
| Term | Meaning |
|---|---|
| Source code | The program as written by the programmer, in a high-level language or assembly language |
| Object code | The translated program produced by a compiler or assembler, ready to be linked |
| Machine code | Binary instructions the processor can run directly |
| Translator | A program that turns source code into a form the computer can run: a compiler, interpreter or assembler |
A compiler translates the whole high-level program in one go, before it is run. The rest of the AS part of this topic follows the stages a compiler goes through.