Hardware
The parts of the CPU and how it runs instructions, embedded systems, input and output devices, sensors, data storage and network hardware.
📌 Key points
- In the Von Neumann architecture, data and instructions are stored together in the same memory. The CPU contains the ALU (arithmetic and logic operations) and the CU (controls the fetch–decode–execute cycle and sends control signals).
- Registers: the PC holds the address of the next instruction, the MAR holds the address to be read from or written to, the MDR holds the data or instruction fetched (or to be written), the CIR holds the instruction being decoded and executed, and the ACC stores results from the ALU.
- Buses: the address bus carries addresses one way (CPU to memory), the data bus carries data and instructions both ways, and the control bus carries control signals (e.g. read, write, clock) both ways.
- Fetch: the address in the PC is copied to the MAR; the instruction at that address is copied into the MDR; it is then copied into the CIR and the PC is incremented. The CU then decodes the instruction and it is executed.
- CPU performance improves with a higher clock speed (more cycles per second), more cores (instructions processed at the same time) and a larger cache (fast memory inside the CPU holding frequently used data and instructions).
- An instruction set is the list of all the commands (opcodes) a CPU can process. An embedded system is a computer system with a dedicated function inside a larger device, e.g. the controller in a washing machine, microwave or car.
- Sensors measure physical quantities (temperature, light, pressure, moisture, humidity, pH, gas, infrared, proximity, sound, acceleration) as analogue data that is converted to digital; actuators are output devices that create movement, e.g. motors, pumps and valves.
- RAM is volatile primary storage holding the programs and data currently in use (read and write); ROM is non-volatile and read-only, holding the start-up instructions. Virtual memory uses part of secondary storage as extra RAM when RAM is full, which is slower.
- Secondary storage is non-volatile: magnetic (hard disk drive, spinning platters and read/write heads), optical (CD, DVD, Blu-ray, read with a laser) and solid-state (SSD, USB flash drive, no moving parts so faster and more durable). Cloud storage keeps data on remote servers accessed over the internet.
- A NIC lets a device connect to a network and has a unique MAC address (48 bits, written as 12 hex digits; the first half identifies the manufacturer). An IP address (IPv4 32 bits, IPv6 128 bits) can be static or dynamic. A router sends packets to the correct destination and connects networks, e.g. a LAN to the internet.
📖 Key terms
- Program Counter (PC)
- Register that stores the address of the next instruction to be fetched.
- Cache
- Small, very fast memory in or near the CPU that stores frequently used instructions and data.
- Embedded system
- A computer system with a dedicated function, built into a larger device.
- Sensor
- An input device that measures a physical property of its surroundings.
- Actuator
- An output device that produces physical movement, such as a motor or valve.
- Virtual memory
- Part of secondary storage used as if it were RAM when RAM is full.
- MAC address
- A unique 48-bit hardware address given to a NIC by the manufacturer.
✏️ Worked example
Describe the fetch stage of the fetch–decode–execute cycle.
- The PC holds the address of the next instruction.
- This address is copied into the MAR and sent along the address bus to memory.
- The instruction stored at that address is sent along the data bus into the MDR.
- The instruction is copied from the MDR into the CIR.
- The PC is incremented so it holds the address of the next instruction.
Always name the registers and buses in full the first time (e.g. Memory Address Register, MAR) and keep the steps in the right order: PC → MAR → (address bus) → memory → (data bus) → MDR → CIR.
Test yourself8 questions from a bank of 17. A new mix every time.
Start the quiz →