Fetch Cycle, E N Ipr
Fetch Cycle, E N Ipr
- Fetch: The CPU fetches the instruction from memory (using the Program Counter - PC).
- Execute: The CPU carries out the instruction (e.g., arithmetic operation, memory access).
Diagram:
[PC] --> [Memory] --> [IR] --> [Control Unit] --> [ALU/Register]
^ v
- Fetch: Instruction is read from memory and stored in the Instruction Register (IR).
- Decode: The control unit decodes the instruction to determine required actions.
- Decodes instructions.
Step-by-step:
5. PC is incremented.
5. What is the role of the instruction register (IR) in the execution cycle?
The IR temporarily holds the current instruction fetched from memory. It ensures the instruction is
- If PC is changed (e.g., due to a jump or branch instruction), the CPU will fetch the next instruction
- It alters the program flow, allowing loops, function calls, or conditional execution.
Additional: Explain how a CPU executes an arithmetic operation using the fetch-execute
cycle.