Hardware

When robots from the future destroy us, it's their hardware that will do it

Hardware is the physical components or workings of a computer system. It includes input, processing and output devices. The Central Processing Unit (CPU) can be thought of as the brain of the computer. The performance of the CPU is affected by the number of cores, clock speed and memory.

The CPU and memory work together to process instructions and run programs. There are different types of memory – volatile and non-volatile.

Purpose of the CPU

The purpose of the CPU is to process data and carry out instructions. Whatever you are using your computer for, be it playing computer games or surfing the web, the CPU is working in the background. Data and instructions are transported around the CPU through the use of buses.

The CPU is the most important part of a computer, responsible for all the processing that is carried out. It processes data using the fetch-execute cycle.

Components of the CPU

The CPU is made up of several components. The structure of these components is referred to as the 'computer architecture'. Most computers today use a Von Neumann architecture – Control Unit (CU), Arithmetic and Logic Unit (ALU) and Immediate Access Store (IAS).

A CPU is made up of three parts; the control unit, the arithmetic logic unit and the immediate access store.A simplified Von Neumann chip architecture

The CPU contains:

  1. The Control Unit (CU)
    • Coordinates the timing of the different components and the flow of data in the CPU
    • Is responsible for fetching and decoding instructions and managing their execution on the processor
    • Controls and monitors the hardware attached to the computer
    • Tells the ALU, the computer's memory and the hardware devices how to respond to an instruction
    • Communicates with the rest of the components by using the control bus
  2. The Arithmetic and Logic Unit (ALU) is where the CPU performs the arithmetic and logic operations. Data is passed to the ALU to allow the required calculations to be carried out. The results of any calculations are then sent to be stored in a register. There are two parts to the ALU:
    • The arithmetic part, which deals with calculations, e.g. 1 + 2 = 3
    • The logic part, which deals with any logical comparisons, such as the comparison of two numbers, e.g. 2 > 1
    Typically, the ALU includes a register that it uses to store intermediate results of calculations. This register is known as the accumulator.
  3. The Immediate Access Store (IAS)
    • This is where the CPU holds all the data and programs it is currently using
    • The IAS is often referred to as the registers, which are a very small amount of storage. In a 64-bit processor, each register will store just 64 bits