Low-level languages

Low-level languages sit close to the computer's instruction set. An instruction set is the set of instructions that the processor understands.

Two types of low-level language are:

Machine code

An instruction set relates to a specific processor and is written in machine code. The central processing unit (CPU) understands machine code directly and can act upon the instructions. A program written in machine code consists of 0s and 1s only. Machine code is very difficult to learn, write and debug. Even a very simple program could have thousands of 0s and 1s in it.

Assembly language

Assembly language sits between machine code and high-level languages in terms of ease of use. While high-level languages use statements to form instructions, assembly language uses mnemonics (short abbreviations). Each mnemonic directly corresponds with a single machine code instruction. Here are some examples of mnemonics:

MnemonicAction
LDALoads a value from a memory address
STAStores a value in a memory address
ADDAdds the value held in a memory address to the value held in the accumulator
SUBSubtracts from the accumulator the value held in a memory address
MOVMoves the contents of one memory address to another

In assembly language, programmers write programs as a series of mnemonics. Mnemonics are much easier to understand and debug than machine code, giving programmers a simpler way of directly controlling a computer.

Assembly language is still used today, for example, in low-level embedded systems and device drivers. It is faster to run because it doesn’t need as much translation as a high-level language (see Translator section for more information).

curriculum-key-fact
Assembly language uses mnemonics to represent instructions.

Writing in mnemonics is easier for programmers because these abbreviations are usually brief representations of the actual commands. They are quicker to write than binary, and make it easier to spot mistakes.

‘Little Man Computer’ (LMC) is a simulation of a very basic processor using Von Neumann architecture. It uses an example of assembly language that contains a limited set of mnemonic instructions which can be used to program simple assembly programs. ‘Little Man Computer’ is freely available on the internet for students to use.