Programming languages — Edexcel GCSE Computer Science
Verified courseTeaching note checked against the official specification.
Programming languages explained
Programming languages covers 2 specification points, including Understand the characteristics and purposes of… and Understand how an interpreter differs from a….
Read the full explanation
Open a point below for its explanation and revision guidance.
3.3.1 understand the characteristics and purposes of low-level and high-level programming languages
Low-level languages sit close to the hardware: machine code is binary instructions executed directly by the CPU, and assembly language uses mnemonics that map almost one-to-one onto machine instructions, needing an assembler to translate. They give precise control over registers and memory and can be very efficient, but they are hard to read, write and port between processor families. High-level languages such as Python or Java use readable statements, data structures and abstraction, so programs are quicker to develop, easier to maintain and usually portable, though a translator is needed and the code may use more memory. Purposes follow from this: low-level code suits device drivers, embedded firmware and time-critical routines; high-level code suits general application development where programmer productivity and clarity matter most.
3.3.2 understand how an interpreter differs from a compiler in the way it translates high-level code into machine code
A compiler translates the whole high-level source program in one go, producing a machine code file that can then be run without the compiler present. Errors are reported together after translation, and the compiled program usually runs quickly because translation has already happened. An interpreter translates and executes the source one statement at a time, so it stops at the first error it meets and no separate machine code file is produced; the interpreter must be present each time the program runs. Interpretation suits development and testing because errors are found immediately, while compilation suits finished software that must run efficiently and be distributed without source code.
Your focus
- State a characteristic of machine code, assembly language and a high-level language.
- Explain the purpose of using a low-level language for hardware control and a high-level language for application development.
- Compare low-level and high-level languages in terms of readability, control, portability and need for translation.
Show all 6 objectives
- Describe how a compiler translates a whole program into machine code before execution.
- Describe how an interpreter translates and executes a program statement by statement.
- Compare compiler and interpreter in terms of error reporting, output file and execution speed.
Programming languages exam tips
Marking Points
- Machine code is binary and executed directly by the processor, so it is the lowest level and needs no translation.
- Assembly language uses mnemonic codes and is translated by an assembler; it is low-level but more readable than machine code.
- Low-level languages give direct control of hardware, registers and memory, which supports drivers, firmware and time-critical routines.
- High-level languages use readable statements and abstractions, making programs faster to write, easier to debug and maintain.
- High-level code is generally portable across machines but must be translated by a compiler or interpreter before execution.
- The purpose of a language choice depends on the task: hardware control and efficiency favour low level, productivity and maintainability favour high level.
- A compiler translates the entire source program before any of it is executed, producing a machine code file.
- A compiler reports errors together after translating the whole program, so several errors may be listed at once.
- An interpreter translates and executes one statement at a time, stopping when it reaches an error.
- An interpreter does not produce a standalone machine code file, so the interpreter must be available whenever the program runs.
- Compiled code generally executes faster because translation is completed in advance; interpreted code is convenient during development because errors appear immediately.
- The choice depends on purpose: interpretation for testing and learning, compilation for efficient distribution of finished software.
Examiner Tips
- 💡Learn one clear contrast pair, such as machine code versus Python, and be ready to state a characteristic and a purpose for each.
- 💡Link each characteristic to a purpose: direct hardware control suits drivers, while readability and maintainability suit large applications.
- 💡Check the question wording for 'low-level' or 'high-level' before choosing, because distractors often swap the two sets of features.
- 💡Answer with the translation unit: whole program for a compiler, one statement at a time for an interpreter.
- 💡Mention the output: a compiler produces a machine code file, an interpreter does not.
- 💡Add the practical consequence, such as speed of the finished program or immediate error reporting, to secure the explanation mark.
Common Mistakes
- Believing assembly language is a high-level language because it uses words: it is low-level, since each mnemonic corresponds closely to one machine instruction and an assembler translates it.
- Thinking high-level code runs directly on the CPU: it must first be translated into machine code by a compiler or interpreter.
- Assuming low-level always means faster in every case: low-level code gives control and can be efficient, but a well-written high-level program may still meet the need, so the choice depends on the task.
- Confusing portability with translation: portability means the same source can be moved to another machine, not that no translation is required.
- Saying an interpreter translates the whole program first: it works statement by statement, executing as it goes.
- Claiming a compiler runs the program: the compiler produces machine code, and the resulting file is what runs.
- Thinking interpreted programs never become machine code: each statement is translated into machine code as it is reached, but no complete machine code file is saved.
- Believing only compilers find errors: both find errors, but a compiler reports them after translating everything, while an interpreter stops at the first error encountered.