Languages
Programming languages are grouped into two levels: high-level and low-level. The level depends on how close the language is to people or to the processor. A language close to English and maths is high-level; a language close to the instructions a processor carries out is low-level.
A high-level language uses readable words and familiar maths, so you can look at a line and roughly follow what it does. A low-level language uses instructions that match the hardware, so it is much harder to read. Machine code is the form the processor executes directly.
The word low-level does not mean poor, simple or old, and high-level does not mean better. These words only describe distance from the processor. A low-level language is nearer the hardware, which is exactly what a programmer sometimes wants.
In a high-level language, one statement can do a lot of work. Adding up every score in a list can be one short statement, and you never think about where those values sit in memory.
In a low-level language, the same job is broken into small steps: fetch one value, fetch the next, combine them, store the result. In machine code, each step is one instruction the processor can carry out directly. That is why low-level code is longer and harder to follow, but gives exact control over what the machine does.
Machine code is closest to the processor. Assembly language sits just above it, and high-level languages are furthest away, at the human end.
| Question to ask | High-level | Low-level |
|---|---|---|
| Closer to what? | People: English words and maths | The processor: its own instructions |
| How much work is one line? | Often many machine instructions | Usually one machine instruction |
| How easy to read and write? | Easier | Harder, needs knowledge of the hardware |
To classify a language or a statement about one, ask only one thing: is this aimed at people, or at the processor?
OCR GCSE Computer Science · Languages