Assembly Language
Aligned to the AQA 7517 specification
- Level
- Intermediate
- Reading time
- 5 min
- Published
- 13 June 2026
- Updated
- 1 July 2026
On this page
Key takeaways
- Assembly language uses human-readable mnemonics that an assembler translates one-to-one into the binary machine code instructions for the target processor.
- LDR copies data from memory or a literal into a register; STR copies data from a register into memory, with the destination register first in LDR and the source register first in STR.
- COMPARE (CMP) subtracts two values and sets the status register flags without storing the result, so it must precede a conditional branch which tests those flags.
- A logical shift left by 1 multiplies an unsigned value by 2 and a logical shift right by 1 performs integer division by 2; bits shifted out are discarded and zeros fill vacated positions.
- Every well-formed assembly program ends with HALT; without it the processor continues into the next memory location and executes whatever binary data is there as instructions.
How much of this have you taken in?
Quiz yourself on this section, free, no card needed.
Key terms
- Assembly language
- A low-level language that uses human-readable mnemonics to represent machine code instructions.
- Mnemonic
- A human-readable code, such as LDR or ADD, that an assembler translates one-to-one into a binary machine code instruction.
- Immediate operand
- A literal value used directly in an instruction, denoted in AQA notation by #n.
- Direct address
- An operand written as n without #, referring to the value held at memory address n.
- LOAD (LDR)
- An instruction that copies data from memory or a literal into a register.
- STORE (STR)
- An instruction that copies data from a register into memory.
- COMPARE (CMP)
- An instruction that subtracts two values to set the status register flags without storing the result.
- Branch instruction
- An instruction that overwrites the Program Counter with a target address to redirect execution, either unconditionally or based on the status flags.
- Mask
- A bit pattern used with a bitwise operation, such as AND to isolate specific bits or EOR to toggle them.
- Logical shift
- A shift that moves all bits left or right within a register, discarding bits shifted out and filling vacated positions with zeros.
- HALT
- An instruction that terminates the program so the processor stops fetching and executing instructions.
Frequently asked questions
LDR (LOAD) copies data from memory or a literal into a register, with the destination register first. STR (STORE) copies data from a register into memory, with the source register first. The processor cannot operate on data in memory, so it must be loaded into a register first.
Conditional branches such as BEQ and BNE check the status register flags, and those flags are set by CMP or the last arithmetic instruction. A conditional branch without a preceding CMP may jump based on stale flags from a previous operation.
HALT terminates the program so the processor stops fetching and executing instructions. Without it the processor continues into the next memory location and executes whatever binary data is there as if it were instructions, producing undefined behaviour such as corrupted data or crashes.
Generate revision on any topic you study
Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.
Lessons on anything
Structured, level-matched lessons on any topic you study
Practice quizzes
Find out what you actually know before the exam does
Flashcard sets
Lock in key concepts with instant revision cards
Ask Aica
Stuck on something? Get a clear explanation, any time
Processor Components and the Fetch-Execute Cycle
Interrupts and Processor Performance
Related lessons
6 min
Processor Components and the Fetch-Execute Cycle
A-Level Computer Science · AQA 7517
1 month ago
7 min
5 min