Computer Science – 4.1 Central Processing Unit (CPU) Architecture | e-Consult
4.1 Central Processing Unit (CPU) Architecture (1 questions)
The Fetch-Execute (F-E) cycle is the fundamental cycle of operation for a Central Processing Unit (CPU). It involves three main stages: Fetch, Decode, and Execute. These stages are repeated continuously as the CPU processes instructions.
1. Fetch:
In the Fetch stage, the CPU retrieves an instruction from memory. The process begins with the Program Counter (PC), a register that holds the memory address of the next instruction to be executed. The value in the PC is sent to the Memory Unit. The Memory Unit then retrieves the instruction stored at that address and sends it back to the CPU, typically via the Address Bus. The instruction is then loaded into the Instruction Register (IR). Finally, the PC is incremented to point to the next instruction in memory, allowing the cycle to continue. The Memory Unit and the Program Counter (PC) are crucial components here.
2. Decode:
The Decode stage involves interpreting the instruction that has been fetched. The instruction in the IR is sent to the Control Unit. The Control Unit decodes the instruction, determining the operation to be performed and identifying the operands (data) required. This involves examining the opcode (operation code) of the instruction. The Control Unit then generates control signals that direct the other components of the CPU to perform the necessary actions. The Control Unit is the primary component responsible for decoding and controlling the F-E cycle.
3. Execute:
The Execute stage carries out the operation specified by the instruction. Based on the control signals generated by the Control Unit, the appropriate components of the CPU are activated. This might involve performing arithmetic or logical operations using the Arithmetic Logic Unit (ALU), accessing data from or writing data to memory, or controlling input/output devices. The ALU performs the actual computation. The Arithmetic Logic Unit (ALU) is the key component in this stage. The Registers are also heavily used to hold operands and results during execution.
After the Execute stage, the cycle repeats, starting with the Fetch stage for the next instruction.