GCSE Computer Science Revision

The Purpose of the CPU and the Fetch-Execute Cycle

The Central Processing Unit (CPU) is the primary component of a computer that performs most of the processing inside a computer. To understand how the CPU operates, it is essential to grasp the concept of the fetch-execute cycle. This cycle is the fundamental process through which the CPU carries out instructions from programs.

The Fetch-Execute Cycle

The fetch-execute cycle, also known as the instruction cycle, involves a series of steps that the CPU performs to execute instructions. This cycle is repeated continuously while the computer is powered on.

  • Fetch: The CPU fetches the instruction from the memory (RAM). The address of the next instruction is held in the Program Counter (PC), which is then sent to the Memory Address Register (MAR). The instruction at this address is then moved to the Memory Data Register (MDR).
  • Decode: The fetched instruction is then decoded by the Control Unit (CU). The CU interprets what the instruction is and prepares the necessary circuits for execution.
  • Execute: The CPU executes the instruction. This could involve arithmetic operations in the Arithmetic Logic Unit (ALU), moving data from one register to another, or interacting with input/output devices.

Example:

Consider an instruction to add two numbers. The CPU fetches this instruction, the CU decodes it to understand it's an addition operation, and then the ALU executes it by adding the numbers.