AQA 7517, section 4.7.1.1
The main components
A computer system is built from a small number of main internal components that work together.
| Component | Role |
|---|---|
| Processor (CPU) | Fetches, decodes and executes instructions, and does the calculations |
| Main memory (RAM) | Holds the programs and data currently in use. It's fast, but volatile (its contents are lost when the power is off) |
| I/O controllers | Manage communication with input, output and storage devices |
| Buses | The sets of wires that carry information between the components |
Buses
A bus is a set of parallel wires that carries data or signals between components. Each wire carries one bit, so the width of a bus is the number of bits it can carry at the same time. There are three buses.
| Bus | Carries | Direction |
|---|---|---|
| Address bus | The address of the memory location (or device) to be used | One way: from the processor |
| Data bus | The data or instructions being moved | Two way: to and from the processor |
| Control bus | Control signals: read, write, clock, interrupt requests, and so on | Two way (signals go in both directions) |
Why do components need to communicate?
The processor must fetch instructions and data from memory, send results back, and talk to devices. This communication needs agreed paths and signals, which is what the buses provide.
Example: reading from memory.
- The processor puts the address of the wanted location on the address bus.
- It sends a read signal on the control bus.
- Memory puts the contents of that location on the data bus.
- The processor reads the data from the data bus.
Addressable memory
Main memory is divided into numbered locations, each holding a fixed number of bits (usually a byte or a word). Every location has a unique address, which is how the processor says which one it wants. This is addressable memory.
The number of locations the processor can address depends on the width of the address bus. With address lines, there are different addresses:
| Address bus width | Addresses |
|---|---|
| 8 bits | |
| 16 bits | |
| 32 bits | (4 GiB if each holds a byte) |
Von Neumann and Harvard architectures
Von Neumann architecture
In the von Neumann architecture, instructions and data share the same memory and the same buses.
- Simple, flexible and cheap.
- Because only one thing can use the single bus at a time, fetching an instruction and reading data can't happen together. This limit is called the von Neumann bottleneck.
- Used extensively in general purpose computing systems, such as PCs, laptops and phones.
Harvard architecture
In the Harvard architecture, instructions and data are held in separate memories, with separate buses.
- The processor can fetch an instruction and access data at the same time, so it can be faster.
- Needs more hardware, so it is more complex and costly.
- The program memory can be protected from being changed accidentally.
- Used extensively in embedded systems, such as digital signal processing (DSP) systems, microcontrollers and appliances.
| Von Neumann | Harvard | |
|---|---|---|
| Memory | One shared memory for instructions and data | Separate memories |
| Buses | One set | Separate sets for instructions and data |
| Fetch instruction and data together? | No | Yes |
| Complexity and cost | Simpler, cheaper | More complex |
| Typical use | General purpose computers | Embedded and DSP systems |
Worked example
Task: a processor has a 12-bit address bus. How many memory locations can it address, and what is the largest address?
- Locations: .
- The largest address is , which is (or ).
Exam tip: state the role of each bus and its direction: the address bus carries addresses (one way), the data bus carries data (two way), and the control bus carries control signals. For von Neumann versus Harvard, the key point is shared or separate memory for instructions and data.
Check yourself
What does the address bus carry, and in which direction?
The address of the memory location (or device) to be accessed, in one direction: from the processor.
How many locations can a 20-bit address bus address?
.
Give one difference between von Neumann and Harvard architectures
Von Neumann uses one memory and one set of buses for both instructions and data. Harvard uses separate memories and buses, so an instruction and data can be accessed at the same time.
Where is Harvard architecture typically used?
In embedded systems such as digital signal processing (DSP) systems.