Classification of programming languages and translators — AQA GCSE Computer Science
Verified courseTeaching note checked against the official specification.
Programming languages are classified into low-level languages (machine code and assembly) and high-level languages like Python, which require translators (compilers, interpreters, or assemblers) to convert source code into executable binary. Understanding how these tools execute instructions and manage hardware access is essential for writing efficient, secure code in AQA GCSE Computer Science.
Classification of programming languages and translators explained
A processor carries out instructions written in machine code, the binary patterns built into its design.
Read the full explanation
Each type of processor, such as a particular CPU family or a microcontroller, recognises only its own specific machine code instruction set: the fixed collection of instructions it can decode and execute, with defined binary patterns for operations like loading, adding or storing. This is why a program compiled for one processor type may not run on another, because the binary instructions mean something different or are not recognised. Assembly language is tied to the same instruction set, so an assembler targets a specific processor. Understanding this explains why software is built or compiled for a particular platform and why portability between different processors is not automatic.
Your focus
- State that processors execute machine code.
- Explain that each type of processor has its own specific machine code instruction set.
- Describe a consequence of differing instruction sets, such as a program not running on a different processor type.
Which command word is this?
Set out the causes, reasons, or mechanisms behind a concept; require connecting phrases such as 'because', 'therefore', or 'which means that' to earn both assertion and reasoning marks.
Classification of programming languages and translators exam tips
Topic Overview
This topic covers the hierarchy of programming languages, distinguishing between high-level languages and low-level languages (machine code and assembly code), alongside the specific translators used to bridge human-readable syntax and hardware architecture. You will explore how computers only natively execute binary instructions and learn how compilers, interpreters, and assemblers convert instructions into executable formats.
Mastering language classification and translation mechanics is fundamental across computer systems, linking software design to the Von Neumann architecture, memory management, and operating system execution. In AQA GCSE examinations, these concepts frequently appear in comparison questions, scenario evaluations for embedded systems, and debugging analysis.
Key Concepts
- →Machine code consists purely of binary digits (1s and 0s) and is the only language directly understood and executed by the Central Processing Unit (CPU).
- →Assembly language is a low-level language that uses human-readable mnemonics (e.g. INP, ADD, STA) to represent machine code instructions with a near one-to-one relationship to hardware instructions.
- →High-level languages (e.g. Python, Java, C#) use problem-oriented, English-like syntax and data structures, allowing code portability across different processor architectures.
- →Compilers translate entire high-level programs into machine code at once, generating an independent executable file, whereas interpreters translate and run code line by line in real time.
- →Assemblers are dedicated translators designed specifically to convert low-level assembly language mnemonics into binary machine code.
Marking Points
- Processors execute machine code, which consists of binary instructions.
- Each type of processor has its own specific machine code instruction set.
- The instruction set is the fixed set of binary instructions a given processor can decode and execute.
- Because instruction sets differ, machine code written for one processor type may not run on another.
- Assembly language and its assembler are tied to a particular processor's instruction set.
Examiner Tips
- 💡Use the phrase 'instruction set' precisely to mean the processor's own set of binary instructions.
- 💡When explaining portability, connect it explicitly to differences between instruction sets.
- 💡Keep the focus on the processor executing machine code rather than on high-level language translation.
- 💡When explaining the benefits of a compiler for distribution, always mention intellectual property protection: compiled code cannot be easily read or modified by the end user.
- 💡Be precise with terminology: refer to 'machine code' or 'object code' rather than just 'computer language' or 'binary'.
- 💡Remember the translator matching rule: High-level language -> Compiler or Interpreter; Assembly language -> Assembler.
Common Mistakes
- Thinking all processors understand the same machine code: correct this by stating each processor type has its own instruction set.
- Believing machine code is translated again at run time: correct this by explaining the processor executes machine code directly.
- Assuming a program runs unchanged on any device: correct this by linking portability problems to differing instruction sets.
- Believing an interpreter converts the entire program before running it: an interpreter never produces an intermediate or final machine code file; it interprets and executes one statement at a time in memory.
- Assuming assembly language is the same thing as binary machine code: assembly language is low-level text made of mnemonics and still requires translation via an assembler before the CPU can execute it.
- Thinking high-level languages execute faster than low-level languages because they are newer: high-level languages have more overhead, abstraction, and memory safety checks, making them generally slower than hand-optimised low-level code.
Revision Plan
- 1Day 1: Learn the definitions and characteristics of machine code, assembly language, and high-level languages.
- 2Day 2: Create a comparison table contrasting Compilers and Interpreters across speed, error handling, distribution, and code security.
- 3Day 3: Practice scenario-based questions identifying which language and translator fit embedded systems versus web development.
- 4Day 4: Attempt past AQA GCSE exam questions on translators under timed conditions and review against official mark schemes.
Exam Question Types
- 📋Table completion questions: checking boxes to indicate whether a feature applies to a compiler, interpreter, or both.
- 📋Scenario-based justification: explaining which translator or language level is best suited for a specific system (e.g. washing machine vs cross-platform app).
- 📋Short definition questions: defining terms like 'low-level language', 'mnemonic', or 'source code' for 1-2 marks.
Command Word Expectations (AQA)
Set out the causes, reasons, or mechanisms behind a concept; require connecting phrases such as 'because', 'therefore', or 'which means that' to earn both assertion and reasoning marks.
Identify both similarities and differences between two or more items (e.g. compilers vs interpreters), making direct parallel points rather than listing isolated descriptions.
Give a specific name, fact, or brief answer without needing extended explanation or working.
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: An embedded micro-controller inside a digital watch has strict memory limitations and controls specific hardware components directly. Explain whether the developer should write the software in a high-level language or assembly language, and state the type of translator required to run this code on the processor. [4 marks]
- 1.Step 1: Identify the hardware context provided in the scenario (embedded device, very limited memory, direct hardware control).
- 2.Step 2: Choose the language classification that matches these criteria: assembly language (a low-level language).
- 3.Step 3: Justify the choice: assembly language translates almost one-to-one into machine code, resulting in very small file sizes (conserving memory) and allows exact control of individual registers and memory addresses.
- 4.Step 4: Identify the specific translator needed: an assembler is required to translate assembly language mnemonics into binary machine code.
Question: Compare the use of a compiler and an interpreter for a software developer who is actively creating and debugging a commercial video game. [6 marks]
- 1.Step 1: Address the debugging and development phase: an interpreter allows faster testing because code can be edited and run immediately without waiting for recompilation, and execution stops on the exact line containing an error.
- 2.Step 2: Address the commercial distribution phase: a compiler generates a standalone executable file (.exe), which means end users do not need to install the translator to play the game.
- 3.Step 3: Address performance: compiled code runs significantly faster because it has already been translated into native machine code, which is essential for resource-heavy games.
- 4.Step 4: Address security/intellectual property: compiled object code hides the original source code from customers, preventing unauthorised modification or theft, whereas interpreted code requires shipping raw source code.