Loading...
A programming language’s abstraction level and its execution strategy are different dimensions. Trace how source instructions become operations a processor can execute.
What you'll be able to do
Machine code encodes instructions from a processor’s instruction set. Assembly language uses symbolic mnemonics and labels for closely related operations. Both are low-level and tied to an architecture, while high-level languages offer abstractions such as structured control, objects and collections.
An imperative high-level program describes state changes and control flow without requiring every machine instruction to be specified. Low-level control can suit specialised hardware work, but usually requires more architecture knowledge and development effort. High-level portability still depends on compatible runtimes and interfaces.
An assembler translates symbolic assembly into machine-code representations. A compiler translates a source program into another representation, often executable or intermediate code. An interpreter executes the meaning of a program representation through a runtime rather than requiring a separately delivered native executable first.
These are execution strategies, not permanent labels proving that a language can only work one way. Compilation can detect some errors before execution, while many data-dependent or logical faults remain. Interpreted execution can support convenient interactive development but still requires analysis of program input.
Some implementations compile source to bytecode or another intermediate language, then interpret or further compile it. A virtual machine supplies the execution environment for that intermediate representation. Just-in-time compilation can translate frequently executed code during runtime.
This mixed pipeline explains why “compiled once” and “interpreted line by line” are oversimplified universal comparisons. Distinguish source code from translated object or executable code and identify which representation is portable. Performance depends on optimisation, runtime and workload rather than just the language’s advertised category.
Source program
↓ compiler
Intermediate code / bytecode
↓ interpreter or further compilation
Processor operationsScroll horizontally to see the full code or table.Attempt the task before opening its worked response. Record each change of state, explain the rule used, and check the result against the original requirements. Code examples labelled Python 3 use that language’s conventions; pseudocode states its own assumptions.
Common mistakes to avoid
Key takeaways
Test yourself
Answer a few questions, then review anything you missed.
Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.