Menu

Stored Program Computers

Central Processing Unit

The central processing unit (CPU) is the component that carries out processing in a computer system. It does this by executing the instructions of a program.

A computer system has five main hardware components: the CPU, main memory, secondary storage, input devices and output devices. Main memory is separate from the CPU, not inside it. The CPU is the part that processes; the other components provide instructions and data, store programs and files, or handle input and output.

The parts of the CPU

The CPU contains the control unit, the arithmetic logic unit (ALU) and registers.

  • The control unit coordinates and controls all activity inside the CPU. It decodes each instruction and directs the other components so that the instruction is carried out. It also manages the timing of operations and sends control signals along the control bus to coordinate reads from and writes to memory.
  • The arithmetic logic unit (ALU) performs arithmetic operations such as addition, subtraction, multiplication and division. It also performs logical operations: it compares data items and carries out Boolean logic, which supports decision making in a program.
  • Registers are storage locations contained inside the CPU.

For example, if a program checks whether a player's score is at least 50, the ALU compares the score with 50. The result of that comparison is used to decide what the program does next. If the score is 50 or more, the program might unlock the next level; otherwise it might ask the player to try again.

Block diagram of the CPU: the control unit directs the ALU and registers, and main memory sits outside the CPU, linked by a control bus and a path carrying instructions and data.

Practise this