Instruction Cycle & Addressing Modes
Expert Answer & Key Takeaways
Understanding how a CPU executes a program: The Fetch-Decode-Execute cycle, and the various Addressing Modes used to find operands.
The Instruction Cycle
A computer program is just a sequence of instructions stored in memory. The CPU executes these instructions one by one. The process by which a computer retrieves a program instruction from its memory, determines what actions the instruction dictates, and carries out those actions is called the Instruction Cycle (also known as the Fetch-Decode-Execute cycle).
1. Phases of the Instruction Cycle
The cycle consists of four main phases:
Step 1: Fetch Cycle
- The CPU fetches the instruction from the main memory (RAM).
- The Program Counter (PC) holds the address of the next instruction.
- This address is sent to the MAR (Memory Address Register).
- The memory reads the instruction at that address and sends it to the MDR (Memory Data Register).
- Finally, the instruction is moved from the MDR to the Instruction Register (IR).
- The PC is then incremented to point to the next instruction.
Step 2: Decode Cycle
- The Control Unit (CU) decodes the instruction sitting in the IR.
- It translates the instruction into control signals that tell the ALU and other components exactly what to do.
Step 3: Execute Cycle
- The actual execution takes place. The ALU performs the required mathematical or logical operations.
- Data might be read from registers or memory to complete the execution.
Step 4: Store (Write-back)
- The result of the execution is written back to a CPU register (like the Accumulator) or to the Main Memory.
2. Micro-Operations
An instruction cycle is made up of smaller, atomic operations called Micro-operations. For example, transferring data from the PC to the MAR (MAR <- PC) is a single micro-operation. A single machine instruction (like ADD) may require multiple micro-operations to complete.
3. Addressing Modes
An instruction usually has two parts: an Opcode (what to do, like ADD) and an Operand (the data to do it on). Addressing Modes define how the CPU calculates the effective memory address of an operand.
Common Addressing Modes:
- Immediate Addressing: The operand is specified directly in the instruction itself. (e.g.,
ADD 5means add the literal number 5). Fastest mode. - Direct (Absolute) Addressing: The instruction contains the exact memory address of the operand. (e.g.,
ADD 1000means add the value found at memory address 1000). - Indirect Addressing: The instruction contains a memory address, and at that address is another memory address pointing to the actual data. (Like a pointer).
- Register Addressing: The operand is held in a CPU register (e.g.,
ADD R1). Very fast since no memory access is needed. - Register Indirect Addressing: The register contains the memory address of the operand. (e.g.,
ADD (R1)). - Index Addressing: The effective address is calculated by adding a constant value to the contents of an Index Register. Useful for arrays.
Course4All Editorial Board
Verified ExpertSubject Matter Experts
Comprising experienced educators and curriculum specialists dedicated to providing accurate, exam-aligned preparation material.
Pattern: 2026 Ready
Updated: Weekly
Found an issue or have a suggestion?
Help us improve! Report bugs or suggest new features on our Telegram group.