📄 Paper 2 · 4.6 Hardware & Software
4.6.2 Classification of Programming Languages
AQA 7517 · A-Level Computer Science · ~13 min read

Levels of Programming Languages

Programming languages are classified by how closely they resemble machine code (low-level) or natural language (high-level). Lower-level = more machine-specific; higher-level = more human-readable and portable.

Machine Code (First Generation)

The only language a CPU can directly execute — binary instructions (0s and 1s). Each instruction type is represented as a binary opcode. Program execution is direct with no translation needed.

  • Extremely fast — no translation overhead
  • Extremely difficult for humans to write and debug
  • Machine-specific — different for each CPU architecture (not portable)

Assembly Language (Second Generation)

Uses human-readable mnemonics for machine code operations (e.g. MOV, ADD, SUB, JMP). One mnemonic = one machine code instruction. Translated to machine code by an assembler.

FeatureDetail
LevelLow-level — close to machine code
PortabilityNot portable — specific to CPU architecture
SpeedVery fast after assembly — near machine code speed
Use caseDevice drivers, embedded systems, performance-critical code
ExampleMOV AX, 5 ; store 5 in register AX

High-Level Languages (Third Generation)

Languages closer to human language and mathematical notation. One line can represent many machine code instructions. Translated by a compiler or interpreter.

  • Portability — same code can run on different hardware with appropriate compiler
  • Productivity — faster to write, read, and debug than low-level code
  • Abstraction — programmer doesn't manage memory addresses, registers, etc.
  • Examples: Python, Java, C#, C++, JavaScript

Comparison: Low-Level vs High-Level

FeatureLow-Level (Assembly)High-Level
ReadabilityDifficult for humansEasy to read
PortabilitySpecific to CPU architecturePortable across platforms
ControlDirect hardware controlAbstracted — less direct control
Development speedSlow — verboseFast — concise
Runtime performanceVery fastSlightly slower (translation overhead)
Use caseOS kernels, drivers, embedded systemsApplication development, web, AI

Procedural vs Object-Oriented vs Declarative Paradigms

Procedural (Imperative)

Programs defined as a sequence of instructions — step-by-step HOW to do something. Uses procedures/subroutines. Examples: C, Pascal, older BASIC.

Object-Oriented (OOP)

Programs organised as objects with data (attributes) and behaviours (methods). Key principles: encapsulation, inheritance, polymorphism, abstraction. Examples: Java, Python, C#.

Declarative

Programmer describes WHAT result is needed, not HOW to compute it. Examples: SQL (query databases), HTML (structure web pages), Prolog (logic programming).

Exam tip: Know machine code → assembly → high-level as a progression from low to high level. Know why each level is used: assembly for performance/hardware control; high-level for productivity/portability. Know the compiler vs interpreter distinction (covered in 4.6.1). Know the three paradigms — procedural (how), OOP (objects), declarative (what). AQA may ask you to compare or choose a language level for a given scenario.
Click through the slides at your own pace. Use arrow keys or click to advance.
Click slide or press arrow keys to navigate

Worksheet — 4.6.2 Classification of Programming Languages

8 questions · instantly marked · AQA 7517 standard

Q1Describe the three levels of programming language (machine code, assembly, high-level). For each, state whether it is low- or high-level and one key characteristic.[6]
✅ Mark scheme
Mark scheme
Machine code: low-level [1]; binary instructions directly executed by the CPU / no translation needed [1]. Assembly: low-level [1]; uses mnemonics (MOV, ADD) — one mnemonic = one machine code instruction, translated by assembler [1]. High-level: high-level [1]; closer to human language, portable across platforms, translated by compiler/interpreter [1].
Q2A developer needs to write a device driver for a new graphics card. Justify why assembly language would be more appropriate than a high-level language.[3]
✅ Mark scheme
Mark scheme
Assembly gives direct hardware control — can manipulate specific registers and memory addresses [1]; very fast execution — near machine code speed, important for graphics performance [1]; device drivers require low-level operations that high-level languages abstract away [1].
Q3State two advantages of using a high-level language over assembly language.[2]
✅ Mark scheme
Mark scheme
Any two of: more readable/maintainable — closer to human language [1]; portable — same code runs on different hardware with appropriate compiler [1]; faster to write and debug — one line = many machine instructions [1]; abstraction — don't need to manage hardware registers/memory addresses [1].
Q4Explain what 'portability' means in the context of programming languages and why machine code is not portable.[3]
✅ Mark scheme
Mark scheme
Portability: the ability of a program to run on different hardware/operating systems without modification [1]. Machine code is not portable because: machine code instructions (opcodes) are specific to a particular CPU architecture (e.g. x86, ARM) [1]; the same binary instructions will not function correctly on a different CPU architecture — different CPUs have different instruction sets [1].
Q5Distinguish between procedural, object-oriented, and declarative programming paradigms. Give one example language for each.[6]
✅ Mark scheme
Mark scheme
Procedural: program = sequence of instructions (how to do it step by step), uses procedures/subroutines [1]; example: C, Pascal [1]. Object-oriented: program = collection of objects with attributes and methods; uses encapsulation/inheritance/polymorphism [1]; example: Java, Python, C# [1]. Declarative: specifies WHAT result is needed not HOW to compute it [1]; example: SQL, HTML, Prolog [1].
Q6An embedded microcontroller in a pacemaker must have minimal code size and maximum efficiency. Suggest the most appropriate language level and justify.[3]
✅ Mark scheme
Mark scheme
Low-level language (assembly / machine code) [1]; maximum efficiency — runs at near machine code speed, critical for real-time medical device operation [1]; minimal code size — assembly maps directly to machine instructions with no overhead from compiler abstractions [1].
Q7SQL is described as a declarative language. Explain what this means using SQL as an example.[2]
✅ Mark scheme
Mark scheme
Declarative: the programmer specifies what result they want, not how to obtain it [1]; e.g. SELECT name FROM students WHERE grade='A' — the programmer states the desired data, and the database engine decides how to retrieve it [1].
Q8Explain why a high-level language program may run slower than an equivalent assembly language program.[2]
✅ Mark scheme
Mark scheme
High-level code must be translated to machine code (by compiler or interpreter) — this translation may produce less optimal machine code than hand-written assembly [1]; high-level languages add abstraction layers that introduce overhead (e.g. memory management, type checking) not present in assembly [1].
Topic Quiz
Question 1 of 15
You scored
out of 15
Card 1 of 9
Click to reveal definition
🎉
All cards reviewed!
TermDefinition
🎯

Mini Test — Programming Languages

10 questions · 10 minutes

← 4.6.1 Hardware & Software
46 of 70 · AQA 7517
4.6.3a OOP Concepts →