All programs are ultimately executed as machine code — sequences of 0s and 1s that the CPU can directly process. However, writing in machine code is extremely difficult for humans. Programming languages exist on a spectrum from low-level (close to machine code) to high-level (close to human language).
Machine Code
Machine code is the lowest-level language — binary instructions directly executed by the CPU. Each instruction is a pattern of 0s and 1s corresponding to specific CPU operations (fetch, decode, execute).
Example:10110000 01100001 — meaning depends entirely on the specific processor's instruction set.
Advantages: Executes fastest (no translation needed); directly controls hardware; most efficient use of memory.
Disadvantages: Very hard to write and read; highly processor-specific (not portable); debugging is extremely difficult; no meaningful variable names.
Assembly Language
Assembly language uses mnemonics (short text codes) to represent machine code instructions. It is a low-level language, but slightly more readable than binary machine code.
MOVAX, 5; Move value 5 into register AX ADDAX, 3; Add 3 to AX (result = 8) MOV[result], AX; Store AX in memory address 'result'
Advantages: More readable than machine code; still directly controls hardware; faster than high-level languages.
Disadvantages: Still processor-specific (not portable); requires detailed knowledge of hardware; difficult to write complex programs; must be translated using an assembler.
High-Level Languages
High-level languages use English-like syntax and abstract away the hardware details. Examples include Python, Java, C#, JavaScript, Visual Basic — and OCR J277 pseudocode.
Advantages: Easier to write, read, and debug; uses meaningful variable names; portable — can run on different processors after translation; one line of high-level code = many machine code instructions; faster to develop programs.
Disadvantages: Cannot directly control hardware; must be translated (compiled or interpreted) before execution — adds processing overhead; translated code may be less efficient than hand-written assembly.
Comparison Table
Feature
Machine Code
Assembly
High-Level
Readability
Very low (binary)
Low (mnemonics)
High (English-like)
Portability
None (CPU-specific)
None (CPU-specific)
High (cross-platform)
Execution speed
Fastest
Fast
Slower (translated)
Hardware control
Full
Full
Limited/None
Translator needed
None
Assembler
Compiler/Interpreter
Ease of development
Very hard
Hard
Easy
Examples
01001000...
MOV, ADD, SUB
Python, Java, C#
Why Use Low-Level Languages?
Despite being harder to write, low-level languages are still used for:
Device drivers — need direct hardware control
Embedded systems (e.g., washing machine controllers, medical devices) — limited memory, need efficiency
Operating system kernels — need access to CPU registers and memory
Real-time systems — where every microsecond matters
Mnemonics in Assembly
Common assembly mnemonics tested at GCSE level:
Mnemonic
Meaning
LDD
Load Direct — load value from memory address into accumulator
STO
Store — store accumulator value to memory address
ADD
Add — add value to accumulator
SUB
Subtract — subtract value from accumulator
END
End — stop program execution
Exam tip: OCR J277 commonly asks: (1) give two advantages of high-level over low-level — always include portability AND ease of writing/reading; (2) give one advantage of low-level over high-level — execution speed or hardware control; (3) identify which language type a snippet belongs to. High-level code has variable names, English-like syntax. Machine code is pure binary. Assembly has mnemonics like MOV, ADD.
⚠️ Common Mistakes
Saying high-level languages "run faster" — they run SLOWER due to translation overhead
Saying machine code "needs a compiler" — machine code is directly executed; no translator needed
Confusing assembly with machine code — assembly uses mnemonics (text); machine code is binary (0/1)
Saying assembly is portable — it is NOT; assembly is CPU-specific just like machine code
Giving only one advantage when the question asks for two — always re-read the mark allocation
✅ Notes completed!
▶
Video coming soon
Click slide or press arrow keys to navigate
Worksheet — 2.5.1 Programming Languages
8 questions · 20 marks
Q1State two advantages of high-level languages over low-level languages.[2]
✅ Mark scheme
Any two from: Easier to read and write (uses English-like syntax) [1]; Portable — can run on different processors/platforms after translation [1]; Easier to debug (meaningful variable names) [1]; Faster to develop programs [1]; One line produces many machine code instructions [1].
Q2Give two advantages of using machine code or assembly language over high-level languages.[2]
✅ Mark scheme
Any two from: Faster execution (no translation needed at runtime) [1]; Direct control over hardware (registers, memory addresses) [1]; More memory-efficient (no overhead from translation) [1]; Used where performance is critical (e.g. device drivers, embedded systems) [1].
Q3Explain what is meant by a 'mnemonic' in assembly language. Give one example.[2]
✅ Mark scheme
A mnemonic is a short text code (abbreviation) that represents a machine code instruction [1]. It is easier to remember and read than binary. Example: ADD (add), MOV (move value), SUB (subtract), LDD (load from memory), STO (store to memory) — any one valid example [1].
Q4Why is machine code described as 'processor-specific'? What problem does this create?[2]
✅ Mark scheme
Machine code instructions are specific to the CPU's instruction set — different processors use different binary codes for the same operation [1]. Problem: a program written for one processor cannot run on a different type of processor without rewriting it from scratch (not portable) [1].
Q5A programmer is writing software for an embedded system in a pacemaker. Explain why they might choose to use assembly language rather than a high-level language.[3]
✅ Mark scheme
Assembly language executes faster than high-level languages as no translation is needed at runtime [1]. A pacemaker has very limited memory, and assembly produces smaller, more efficient code [1]. Direct hardware control is needed to precisely control timing of electrical pulses — high-level languages cannot access hardware directly [1].
Q6Identify the level of language (machine code / assembly / high-level) for each snippet: (a) 10110000 01100001 (b) MOV AX, 5 (c) result = 5 + 3[3]
✅ Mark scheme
(a) Machine code [1] — binary digits (0s and 1s), directly executed by CPU. (b) Assembly language [1] — uses mnemonics (MOV). (c) High-level language [1] — English-like syntax, meaningful variable name 'result'.
Q7Explain what is meant by 'portability' in the context of programming languages.[2]
✅ Mark scheme
Portability means a program can be run on different types of computers/processors [1] without needing to be rewritten. High-level language programs are portable because the translator (compiler/interpreter) handles the conversion to processor-specific machine code [1].
Q8A student says "high-level languages run faster than assembly because they are easier to write." Identify the error and correct it.[4]
✅ Mark scheme
Error: High-level languages do NOT run faster than assembly [1]. Correction: Assembly (and machine code) runs faster because the CPU executes the code directly without needing to translate it first [1]. High-level languages must be compiled or interpreted into machine code before execution, adding overhead [1]. The student has confused 'ease of writing' with 'execution speed' — these are different things [1].
?
out of 20 — self-mark above
Topic Quiz
Question 1 of 15
You scored
out of 15
Card 1 of 9
Click to reveal definition
🎉
Complete!
Term
Definition
🎯
Mini Test — 2.5.1 Programming Languages
10 questions · 17 marks · 10 minutes
⏱ 10:00
17 marks
Section A — Multiple Choice [5 marks]
Q1Which language level is directly executed by the CPU without translation?
Q2Which of the following is an advantage of high-level languages?
Q3Which snippet is written in assembly language? (a) 10110000 01100001 (b) MOV AX,5 (c) result = 5 + 3
Q4What tool is used to translate assembly language into machine code?
Q5A programmer writes a Python script. Why can it run on both Windows and Linux?
Section B — Short Answer [12 marks]
Q6State two advantages of low-level languages over high-level languages.
Mark schemeAny two: Faster execution [1]; Direct hardware control [1]; More memory-efficient [1]; No translation overhead at runtime [1].
Q7Explain what a mnemonic is and give two examples used in assembly language.
Mark schemeA mnemonic is a short text code representing a machine code instruction [1]. Examples (any two): ADD, SUB, MOV, LDD, STO, END [1 per correct example, max 2].
Q8Explain why device drivers are often written in assembly language rather than Python.
Mark schemeDevice drivers need direct hardware control at the register/memory level — Python cannot access hardware directly [1]. Assembly executes faster with less overhead, important for real-time hardware communication [1]. Assembly produces smaller code, suitable for limited-memory environments [1].
Q9State what 'portability' means for programming languages and explain why machine code lacks portability.
Mark schemePortability: ability to run on different hardware/platforms without rewriting [1]. Machine code lacks portability because each processor has a unique instruction set — machine code written for one CPU cannot execute on a different type of CPU [1].
Q10Give one reason why high-level languages execute more slowly than assembly language.
Mark schemeHigh-level languages must be translated (compiled or interpreted) into machine code before/during execution [1]. This translation adds overhead (processing time). Assembly is much closer to machine code and requires much less translation [1].