Cambridge IGCSE · Topic 4.2
IGCSE Computer Science 0478 / Topic 4 / IGCSE

Close to people, or close to hardware.

Programmers can write in languages that read almost like English, or in codes that match the processor's own instructions one for one. Learn what high-level and low-level languages are, where assembly language fits, and the advantages and disadvantages of each.

The key idea

A high-level language (such as Python, Java or Visual Basic) uses English-like statements, so it is easy to read, write and debug and is machine independent: the same program can run on different types of processor once translated. A low-level language is close to the processor's own instructions: machine code (binary) and assembly language, which uses short mnemonics such as LDD and ADD. Low-level code is hard to read and debug and is machine dependent, but allows direct manipulation of the hardware. Assembly language needs an assembler to translate it into machine code.

One task, three levels: add two numbers and store the total High-level language Total ← Price + Tax Assembly language (low-level, mnemonics) LDD 200 ADD 201 STO 202 load, add, store Machine code (low-level, binary the CPU runs) 0001 1100 1000 0010 1100 1001 0011 1100 1010
Fig. 1: the same calculation as high-level code, assembly language and machine code (illustrative opcodes)
Section 01

High-level languages.

High-level languages are designed for people. One statement can stand for many machine code instructions.

DECLARE Price : REAL
DECLARE Tax : REAL
DECLARE Total : REAL
INPUT Price
Tax ← Price * 0.2
Total ← Price + Tax
IF Total > 100
    THEN
        OUTPUT "Free delivery"
ENDIF
Examiner trap

"High-level is easier" is too vague for a mark. Say why: it uses English-like statements, so it is easier to read, write and debug.

Section 02

Low-level: machine code and assembly.

The processor only executes machine code: binary instructions, each made of an opcode and an operand. Assembly language writes each machine code instruction as a short mnemonic instead.

Assembly (mnemonic)Meaning
LDD 200load the value stored at address 200 into the accumulator
ADD 201add the value stored at address 201 to the accumulator
STO 202store the accumulator's value at address 202
Examiner trap

Assembly language is low-level, even though it uses letters. It still matches the processor's instructions one for one, and it still needs an assembler.

Stage 1 · Learn

Check what the sim just showed you

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

Which is an advantage of a high-level language?

Quick check+10 XP

What is a mnemonic in assembly language?

Quick check+10 XP

What translates assembly language into machine code?

Quick check+10 XP

Which language does the processor execute directly?

Section 03

Which level, and why?

Exam questions give a scenario and ask which type of language to use. Match the scenario to the advantages.

High-levelLow-level
Ease of reading and writing codeeasy: English-likehard: mnemonics or binary
Ease of debuggingeasierharder
Machine independenceyes: portable to different processorsno: written for one type of processor
Direct manipulation of hardwarenoyes: e.g. specific registers and memory addresses
Translator neededcompiler or interpreterassembler (assembly); none (machine code)
Worked example Choose a language
A programmer is writing a driver that must control a new graphics card's registers as fast as possible. Another is writing a school timetable app that must run on Windows and macOS. Which type of language should each use?
  1. The driver needs direct manipulation of the hardware and efficient code: a low-level language (assembly).
  2. The app must run on different machines and be easy to maintain: a high-level language, which is machine independent and easier to write and debug.
Answer: Driver: low-level (assembly). Timetable app: high-level.
Your turn
Give one reason a programmer might write part of a program for an embedded system in assembly language.
Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to IGCSE Paper 1 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

Which is a disadvantage of a low-level language?

Exam style+20 XP

Why is assembly language classed as a low-level language?

Exam style+20 XP

A game must run on several different types of computer. Which type of language is most suitable?

Exam style+20 XP

Which statement about machine code is correct?

Skill unlocked

High-level and low-level languages, mastered.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
High-level languages, machine code, assembly language and mnemonics, and the advantages and disadvantages of each level.