What is the difference between high-level and low-level languages, and why use each?
The characteristics and purpose of high-level and low-level languages, the difference between machine code and assembly language, and the advantages and disadvantages of each level.
An OCR J277 2.5.1 answer on high-level and low-level languages: their characteristics and purpose, the difference between machine code and assembly language, and the advantages and disadvantages of programming at each level.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
OCR wants you to know the characteristics and purpose of high-level and low-level languages, the difference between machine code and assembly language, and the advantages and disadvantages of each level. The core idea is a trade-off: high-level languages are easier for humans, low-level languages give control and efficiency on the hardware. This is examined in Paper 2.
High-level languages
Low-level languages
Machine code and assembly language
Try this
Q1. State one advantage of a high-level language. [1 mark]
- Cue. Any one: easier and quicker to read, write and debug, or portable (runs on different machines).
Q2. State what machine code is. [1 mark]
- Cue. The binary instructions (1s and 0s) that the CPU executes directly.
Q3. State one reason a programmer might choose assembly language. [1 mark]
- Cue. For direct control over the hardware, or to write very efficient code, for example on an embedded system with little memory.
Exam-style practice questions
Practice questions written in the style of OCR exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
OCR 20214 marksExplain the difference between a high-level language and a low-level language, giving one advantage of each.Show worked answer →
High-level language (up to 2): a language close to human language, using English-like keywords (such as Python, Java or C#), that is easier to read, write and debug and is portable across different machines. Advantage: it is much quicker and easier to write and understand, and one program can run on different types of computer.
Low-level language (up to 2): a language close to the hardware, either machine code (binary) or assembly language, specific to a processor type. Advantage: it gives the programmer direct control over the hardware and can be written to run very efficiently (fast, using little memory).
Markers reward the close-to-human versus close-to-hardware distinction and a genuine advantage for each. Saying "high-level is better" without the trade-off misses the point.
OCR 20223 marksState what is meant by machine code, explain how assembly language relates to it, and give one reason a programmer might choose to write in assembly language.Show worked answer →
Machine code (1): the binary instructions (1s and 0s) that the CPU executes directly; it is specific to a particular processor.
Assembly language (1): a low-level language that uses short mnemonics (such as ADD, SUB, LDA) to represent machine-code instructions, making it easier for a human to read and write than raw binary; it is translated to machine code by an assembler, usually one mnemonic to one machine instruction.
Reason to use assembly (1): to control the hardware directly, to write code that runs very efficiently, or to program devices with limited memory such as embedded systems.
Markers reward machine code as binary the CPU runs directly, assembly as mnemonics translated to machine code, and a genuine reason (direct control or efficiency).
Related dot points
- The purpose of translators, the characteristics of a compiler and an interpreter and how they differ, and the role of an assembler in translating assembly language.
An OCR J277 2.5.2 answer on translators: why source code must be translated, the characteristics of a compiler and an interpreter and how they differ, and the role of an assembler in translating assembly language to machine code.
- The common tools and facilities available in an integrated development environment (IDE): the editor, error diagnostics, run-time environment and translators, and how each helps a programmer.
An OCR J277 2.5.2 answer on integrated development environments: what an IDE is and the common tools it provides (editor, error diagnostics and debugging, run-time environment and translators), and how each helps a programmer write and test code.
- How programming languages, source code, translators and integrated development environments fit together: why source code must be translated to machine code, and how the choice of language and tools supports writing software.
An OCR J277 2.5 answer tying the topic together: source code versus machine code, why translation is needed, how language level (high or low) is chosen, and how an IDE supports the whole process of writing, translating, running and debugging software.
- The purpose of the CPU and the fetch-decode-execute cycle, the von Neumann architecture, and the function of common CPU components (ALU, CU, cache, registers including the MAR, MDR, Program Counter and Accumulator).
An OCR J277 1.1.1 answer on the purpose of the CPU, the fetch-decode-execute cycle, the von Neumann architecture, and the function of the ALU, control unit, cache and the named registers (MAR, MDR, Program Counter, Accumulator).
- The purpose and characteristics of embedded systems, with examples, and how they differ from general-purpose computer systems.
An OCR J277 1.1 answer on embedded systems: what they are, their characteristics (dedicated function, low cost, low power, small size), examples, and how they differ from general-purpose computers.
Sources & how we know this
- OCR GCSE (9-1) Computer Science (J277) specification — OCR (2020)