Grade 11 · Theory
Compilers and interpreters
Software · about 3 min
Programs written in a high-level language must be translated to machine code. The two main translation strategies — compiling and interpreting — trade speed for flexibility.
Key points- A compiler translates the whole program once into an executable; errors are reported before running.
- An interpreter translates and executes line by line every run; great for quick testing.
- Compiled code runs faster; interpreted code is easier to debug and platform-flexible.
- Some languages (Java, C#) compile to intermediate code that a virtual machine runs.
- Delphi/Pascal — the CAPS practical language — is compiled.
- Source code — the human-readable program text.
- Machine code — binary instructions the CPU executes directly.
EXAM TIP
a compare-the-two table (when errors show, speed, what is distributed) is the standard answer format.