AQA AS Level Computer Science: The Processor Instruction Set
Page 1: Course Overview and Unit Context
This material forms part of the AQA AS Level Computer Science curriculum for Paper 2.
- Unit: Unit 5 – Computer Organisation and Architecture
- Topic: The Processor Instruction Set
- Curriculum Body: AQA
- Publishing Partner: PG ONLINE
Computer organisation and architecture investigates the fundamental engineering principles governing how processor hardware operates, stores data, interprets machine-level programs, and executes instructions at the circuit level.
Page 2: Learning Objectives
The principal learning goals for this unit are structured around three fundamental competencies:
- Role of the Instruction Set: Describe and define the precise role that an instruction set plays within central processing units (CPUs).
- Instruction Format and Components: Explore the detailed internal format of processor instructions, analyzing the mechanical role performed by each distinct bit field and component.
- Addressing Modes Comparison: Formulate a direct comparison between direct addressing and immediate addressing modes within the execution cycle of processor instructions.
Page 3: Natural Language Analogy for Processor Instructions
To understand how computer processors interpret machine instructions, consider how human languages convey procedural commands.
Comparative Commands Across Natural Languages
- English: "Walk forward 10 steps, turn right 90 degrees"
- French: "Avancez 10 marches, tournez à droite à 90 degrés"
- Spanish: "Caminar hacia adelante 10 pasos, gire a la derecha 90 grados"
- Mandarin Chinese: "向前走10步,向右转90度"
Structural Analysis
- Commonalities: All four expressions convey the exact same underlying semantic meaning, algorithmic procedure, and operational parameters: moving forward by a magnitude of units, followed by an axial rotation of to the right.
- Differences: Each statement uses entirely different vocabularies, grammatical structures, phonetics, and symbolic character encodings tailored to its specific linguistic system.
- Architectural Analogy: In computer architecture, different central processing units feature their own proprietary syntaxes and operational encodings, yet they perform fundamentally identical mathematical and logical operations.
Page 4: Role and Definition of the Processor Instruction Set
- Processors have unique, specialized methods of expressing instructions governed by their internal electronic designs.
- Definition of an Instruction Set: An instruction set is the complete, definitive collection of all commands and operations that a specific central processing unit is physically wired to execute.
- Hardware Dependency: Different processor architectures (such as x86, ARM, or MIPS) possess their own distinct instruction sets. While two completely different processors may carry out identical logical operations (such as loading data from memory or adding numbers), the binary representation and execution mechanics of those instructions often differ substantially.
Page 5: Functional Categories and Types of Instructions
A processor instruction set consists of six major functional groups of operations:
- Data Transfer: Operations responsible for moving data between registers and main memory locations.
- Examples:
LOAD(read data from memory into a register),STORE(write data from a register into memory).
- Examples:
- Arithmetic Operations: Basic mathematical calculations carried out within the Arithmetic Logic Unit (ALU).
- Examples:
ADD(addition),SUBTRACT(subtraction).
- Examples:
- Comparison Operations: Instructions designed to evaluate two distinct operands against each other (e.g., testing if values are equal, greater than, or less than one another) to set processor status register flags.
- Logical Operations: Boolean bitwise manipulations evaluated inside the ALU.
- Examples:
AND,OR,NOT.
- Examples:
- Branch Instructions: Operations that alter the sequential flow of program execution by updating the Program Counter (PC).
- Conditional Branches: Execution path changes only if specific status register flag conditions are satisfied (e.g., branch if equal to zero).
- Unconditional Branches: Execution path changes unconditionally under all circumstances.
- Shift Operations: Operations that shift the binary bits within a register to the left or to the right.
- Logical and arithmetic shifts serve diverse functional purposes, such as rapid binary multiplication or division by powers of , as well as isolating specific bits.
Page 6: Machine Code Representation and Word Length
- The processor instruction set dictates every valid instruction pattern and its corresponding binary encoding.
- Processor instructions exist exclusively as patterns of binary digits (s and s).
- Word Length: The total quantity of binary bits allocated to encode an individual instruction depends directly on the native word length of the processor architecture.
- Definition of Machine Code: Machine code is the lowest-level programming representation consisting solely of binary digits. It represents the only language that the physical processor circuitry can natively decode and execute without prior compilation or translation.
Page 7: Basic Machine Code Instruction Set Architecture
In a processor architecture, each valid operation is paired with an immutable binary machine code bit pattern.
Single-Byte Instruction Set Example
Consider a theoretical, basic processor featuring a single-byte () instruction word length. In this implementation, the byte is divided into a opcode and a operand:
| Machine code | Instruction | Example Assembly Syntax |
|---|---|---|
0000 1111 | STORE | STO 15 |
0010 1111 | LOAD | LDA 15 |
0100 1111 | ADD | ADD 15 |
1000 1111 | SUB | SUB 15 |
1111 0000 | HALT | HALT |

Bitwise Breakdown of Examples
0000 1111: Opcode0000designates theSTOREcommand, and operand1111refers to memory address (since ).0010 1111: Opcode0010designates theLOADcommand, and operand1111targets memory address .0100 1111: Opcode0100designates theADDcommand, adding the contents of memory address to the accumulator.1000 1111: Opcode1000designates theSUBcommand, subtracting the value held at memory address from the accumulator.1111 0000: Opcode1111designates theHALTcommand, which terminates execution; the operand bits0000remain unused.
Page 8: Core Components of Processor Instructions
An instruction word is structurally divided into two primary sections: the Operation Code (Opcode) and the Operand(s).
1. Operation Code (Opcode)
The opcode provides all operational instructions to the CPU control unit and is subdivided into two distinct functional segments:
- Basic Machine Operation: The fundamental command the processor must execute (e.g.,
ADD,SUB,LOAD,STORE). - Addressing Mode: A dedicated bit field indicating how the operand field must be interpreted by processor circuitry (e.g., determining whether the operand holds direct raw numerical data, a memory location, or a register designation).
2. Operand(s)
The operand field contains one or more data references required to carry out the instruction. Depending on the addressing mode, the operand may contain:
- A literal data value.
- A specific main memory (RAM) address.
- A specific CPU register identifier.
Page 9: 16-Bit Instruction Format and Bit Allocation
The distribution of bits between the opcode and operand depends on the hardware architecture and native word length of the system.
Bit Layout of a 16-Bit Word Instruction
Below is an architectural configuration for a processor operating with a instruction word:
| Section | Operation Code (Opcode) | Operation Code (Opcode) | Operand(s) |
|---|---|---|---|
| Subdivision | Basic machine operation | Addressing mode | Operand data / reference |
| Bit Width | |||
| Bit Indices | Bits down to | Bits and | Bits down to |
| Sample Bits | 0 1 1 1 0 1 | 0 1 | 0 0 0 0 0 1 0 1 |

Functional Decomposition of the Sample Bits
- Basic Machine Operation (
011101): Represents the operation identifier in . A field can represent up to distinct machine operations. - Addressing Mode (
01): Represents the addressing mode via a code, permitting unique addressing modes. - Operand (
00000101): Represents an address or value, corresponding to decimal ().
Page 10: Operand Interpretations and Addressing Mode Roles
The operand specifies the target data of an operation. It is interpreted in one of three ways depending on the addressing mode bits:
- Literal Value: The operand holds the actual raw data value to be used directly in the calculation.
- Memory Address: The operand holds the pointer/address identifying the exact memory cell where data resides.
- Register Reference: The operand specifies a internal CPU register where the data is located.
Addressing Mode Bits
A dedicated addressing mode field within the opcode informs the instruction decoder which interpretation must be applied during the decode-execute phases.
Page 11: Immediate Addressing Mode Mechanics and Limitations
Under immediate addressing, the operand does not refer to a storage address; instead, the operand field contains the actual numerical data value.
Immediate Addressing Bit Pattern Example
| Field | Basic Machine Operation | Addressing Mode | Operand(s) |
|---|---|---|---|
| Binary Value | 1 0 1 1 0 1 | 0 0 | 0 0 0 0 1 1 0 0 |
| Field Description | Basic machine command | Immediate addressing indicator (00) | Literal integer value: |

- Addressing mode code
00explicitly indicates that the operand is a literal constant value. - The operand bits
0000 1100evaluate to:
- The processor directly executes the operation using the constant integer .
Limitation of Immediate Addressing
- Range and Magnitude Constraints: The maximum integer value that can be specified is strictly constrained by the total number of bits allocated to the operand field. In an unsigned operand space, values are limited to the range to (). For two's complement signed integers, the range is limited to through .
- Static Nature: Data cannot be modified dynamically at runtime. Because the value is hardcoded directly into the instruction word itself, it cannot dynamically reflect changing program state without rewriting code memory.
Page 12: Direct Addressing Mode Mechanics and Operations
Under direct addressing, the operand represents the specific memory address of the storage cell in main memory where the target data is held.
Direct Addressing Bit Pattern Example
| Field | Basic Machine Operation | Addressing Mode | Operand(s) |
|---|---|---|---|
| Binary Value | 1 0 1 1 0 1 | 0 1 | 0 0 0 0 1 1 0 0 |
| Field Description | Basic machine command | Direct addressing indicator (01) | Memory address reference: Address |

- Addressing mode code
01signals to the CPU memory controller that the operand represents a memory location. - The operand bits
0000 1100refer to memory address . - The processor places the address value onto the memory address bus, reads the contents stored at that physical location in RAM, and uses the retrieved data in the operation.
Page 13: Classification and Context of Advanced Addressing Modes
While processor architectures utilize several addressing techniques—such as indirect addressing, indexed addressing, register direct addressing, and relative addressing—they represent advanced concepts beyond the scope of this unit.
Page 14: Practical Exercises – Worksheet 3 Overview
Worksheet 3 consists of two primary practical tasks designed to reinforce instruction set design concepts:
- Task 1: Instruction identification, opcode extraction, and addressing mode verification.
- Task 2: Architectural bit budget calculations, including total operation capacities and operand ranges.
Page 15: Worksheet 3 Task 2 – Bit Allocation and Capacity Calculations
In a fixed-width processor architecture with a total word length of , altering the bit distribution between the opcode and the operand involves engineering trade-offs.
Mathematical Principles
- If bits are allocated to the basic machine operation, the maximum number of distinct operations supported is:
- If bits are allocated to an unsigned operand, the maximum integer value that can be represented is:
- Total word width equation ( standard system):
Architectural Trade-off Table
| Bits used for opcode | Number of possible operations | Bits used for addressing mode | Bits used for operand | Maximum value available for operand |
|---|---|---|---|---|
Key Architectural Trade-Off
Allocating more bits to the opcode increases the instruction vocabulary of the processor, allowing more distinct operations. However, this reduces the bits available for the operand, severely restricting both the maximum immediate integer value and the total direct addressable memory space.
Page 16: Low-Level vs. High-Level Programming Languages
Computer languages exist along a spectrum of abstraction relative to physical processor hardware.
Machine Code
- Composed entirely of binary sequences (s and s).
- Highly difficult for human programmers to author, comprehend, or debug.
- Requires zero translation; executed natively by hardware.
Assembly Language
- Uses short character abbreviations called mnemonics to represent machine operations (e.g.,
LDAfor load accumulator,ADDfor addition,MOVfor register transfer). - Classified alongside machine code as a low-level language because of its one-to-one correspondence with underlying machine instructions.
- Significantly easier to write than raw binary machine code, yet still requires explicit manual management of registers, memory addresses, and execution flags.
High-Level Languages
- Examples: Python, Delphi.
- Provide total abstraction from the underlying machine architecture, registers, and memory busses.
- Feature natural syntax, mathematical expressions, and high-level control structures (such as
whileloops and functions). - Require translation into machine code using compilers or interpreters before the processor can execute them.
Pages 17–18: Summary Assessment and Plenary Knowledge Review
Plenary Review Exercise
- The format of instructions is determined by the processor instruction set.
- This defines what the machine code instructions mean and how the processor should execute them.
- Instructions are made up of two parts: opcode (which includes the addressing mode) and operand.
- The addressing mode determines how data used by the instruction can be found.
- Immediate addressing means the operand is the actual value to be used in the instruction.
- Direct addressing indicates that the operand is the address of the data to be used.
Page 19: Copyright and Licensing Framework
- Copyright Holder: © 2016 PG Online Limited.
- Scope of Protection: All unit resources—including worksheets, slide decks, teacher guides, and digital courseware—are protected by international copyright laws.
- Licensing Restrictions: Materials are licensed exclusively for educational use within a single licensed institution at a single geographical site.
- Explicit Prohibitions: Distribution to third parties, transfer across multi-site institutions, public internet transmission, electronic resale, and unauthorized copying are strictly prohibited under the terms of the end-user licensing agreement.