CPU & Buses: How the CPU Talks to the World
Jump to navigation
Jump to search
CPU & Buses: How the CPU Talks to the World
This page introduces the internal structure of the CPU and explains how it communicates with memory and peripherals through buses.
CPU building blocks
The CPU is the central unit that executes instructions. Its main components are:
- Arithmetic Logic Unit (ALU) for arithmetic and logical operations.
- Registers for storing temporary values and instruction pointers.
- Control logic for decoding instructions and directing execution.
- Buses for communication with external components.
Address and data buses
Communication between CPU and memory uses two main buses:
- Address bus: the CPU places the address of the memory cell it wants to access.
- Data bus: transfers the actual data to or from that address.
Read and write sequences
Reading:
- CPU places the address on the address bus and signals a read.
- Memory responds by placing the requested data on the data bus.
Writing:
- CPU places the address and the data on the buses.
- Memory stores the data at the specified location.
Peripherals and addresses
Peripherals such as graphics cards, disk controllers, and network cards also communicate through buses. Two models are used:
- Memory-mapped I/O: peripherals share the same address space as memory.
- Port-mapped I/O: peripherals have their own dedicated address space.
Bus types
- Parallel buses: multiple lines transmit address and data simultaneously.
- Serial buses: data transmitted bit by bit at high speed, examples include USB and PCI Express.
- Some specialized processors (e.g. DSPs) use multiple dedicated buses for higher throughput.
Regardless of the implementation, bus communication is transparent to normal program code.