The instruction set is the fixed contract between hardware and software. It defines the exact binary commands a CPU can execute directly, allowing high‑level programs to be translated into actions the processor can perform.
An instruction is a binary word that tells the processor to perform a specific operation (arithmetic, data movement, or control flow).
ADD, LOAD).Cambridge IGCSE expects you to recognise fixed‑length formats. The two most common lengths are 8‑bit (illustrative) and 32‑bit (typical for many RISC processors).
| Format | Length (bits) | Typical fields |
|---|---|---|
| 8‑bit (illustrative) | 8 | Opcode (3) | Register (2) | Immediate/Address (3) |
| 32‑bit (common three‑field example) | 32 | Opcode (6) | Register 1 (5) | Register 2/Immediate (5) | Address/Shift (16) |
Assembly: ADD R9, R2, #20
ADD = 000100 (6 bits).01001 (5 bits).00010 (5 bits).0000000000010100 (16 bits).000100 01001 00010 0000000000010100
Reading left‑to‑right gives the binary instruction that the CPU will fetch.
Four broad categories are required for the syllabus. Each is illustrated with a typical assembly mnemonic.
LOAD R1, 1000 ; R1 ← M[1000]ADD R3, R1, R2 ; R3 ← R1 + R2BEQ R4, R5, 200 ; if R4 = R5 branch to PC+200SETFLAG Z ; set the Zero flagAddressing modes define how the operand of an instruction is obtained. The table below shows the common modes required for the IGCSE, each with notation, a short explanation and a numeric example.
| Mode | Notation | Explanation | Numeric example |
|---|---|---|---|
| Immediate | #value | The operand is a constant encoded in the instruction. | #5 → binary 00000101 placed directly in the instruction bits. |
| Register | R1 | The operand is the contents of a register. | R3 → use whatever value is currently stored in register 3. |
| Direct | address | The operand is stored at a fixed memory address. | LOAD R2, 1024 → fetch the word at memory location 1024. |
| Indirect | (R1) | The register holds the address of the operand. | STORE R4, (R5) → store R4’s value at the address contained in R5. |
| Indexed | address(R1) | Effective address = base address + contents of register. | LOAD R6, 200(R7) → address = 200 + value‑in‑R7. |
Two contrasting philosophies for designing instruction sets. Knowing the differences helps you answer exam questions that ask you to compare them.
LOAD + STORE instructions.REP MOVS copies a string).STRING COPY instruction can replace an entire loop.Every instruction passes through three stages:
Diagram suggestion (for teachers): a block diagram showing the PC → Memory → Instruction Register → Decoder → Control Unit → ALU/Registers → Write‑back, with arrows indicating the flow of opcode, operands, and addressing‑mode signals.
| Mnemonic | Opcode (binary) | Format | Description |
|---|---|---|---|
| LOAD | 000001 | R, Addr | Load word from memory address into register. |
| STORE | 000010 | R, Addr | Store word from register to memory address. |
| ADD | 000011 | R1, R2, R3 | R1 ← R2 + R3. |
| SUB | 000100 | R1, R2, R3 | R1 ← R2 – R3. |
| JMP | 000101 | Addr | Unconditional branch to address. |
| BEQ | 000110 | R1, R2, Addr | Branch if R1 = R2. |
This short program adds the contents of memory locations 1000 and 1004 and stores the result at 1008.
LOAD R1, 1000 ; R1 ← M[1000]
LOAD R2, 1004 ; R2 ← M[1004]
ADD R3, R1, R2 ; R3 ← R1 + R2
STORE R3, 1008 ; M[1008] ← R3
Create an account or Login to take a Quiz
Log in to suggest improvements to this note.
Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources, past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.