Von Neumann architecture, registers and buses
A-Level Computer Science · Hardware and Processor Fundamentals
The stored-program idea
In a von Neumann machine, instructions and data are held in the same memory and travel on the same buses. That is what makes a computer general-purpose — change the program, change the machine. It is also the source of the von Neumann bottleneck: the processor cannot fetch an instruction and its data at the same instant.
Inside the CPU
The control unit decodes instructions and generates the timing signals. The ALU performs arithmetic and logic. Registers, each with one job:
• PC (program counter) holds the address of the next instruction.
• MAR (memory address register) holds the address being accessed.
• MDR (memory data register) holds the data or instruction just fetched, or about to be written.
• CIR (current instruction register) holds the instruction being executed.
• ACC (accumulator) holds the result of ALU operations.
• Status register holds flags such as carry, negative and overflow.
Three buses
The address bus is unidirectional and its width sets the maximum addressable memory ($n$ lines address $2^n$ locations). The data bus is bidirectional and its width sets how many bits move per transfer. The control bus carries signals such as read, write, clock and interrupt request.
What actually makes a processor faster
Clock speed, number of cores, cache size and word length all contribute, and each has a limit. More cores only help software written to use them; a larger cache helps until the working set fits; a faster clock produces more heat. Exam answers must name the limit, not just the benefit.
Worked example: calculating memory capacity from bus width
A computer has a $20$-line address bus and a $16$-line data bus.
(a) Calculate the maximum number of addressable memory locations. (b) If each location holds one byte, what is the maximum memory capacity? (c) If the address bus is widened to $24$ lines, by what factor does the maximum capacity increase?
Solution
(a) $n$ address lines give $2^n$ combinations, each combination being one address.
$2^{20}=1\,048\,576$ locations, that is $1$ Mi locations.
(b) One byte per location ⇒ maximum capacity $=1\,048\,576$ bytes $=\mathbf{1}$ MiB.
Note: the $16$-line DATA bus has no effect on this question. It tells you that $16$ bits are transferred at a time, so two locations can be fetched in one go; that is a matter of throughput, not capacity.
(c) $2^{24}=16\,777\,216$ locations, that is $16$ MiB.
An increase of $\dfrac{2^{24}}{2^{20}}=2^4=\mathbf{16}$ times.
Lesson about powers. Adding $4$ address lines, which sounds like a small change, multiplies the maximum capacity by $16$. Each added line doubles it. This is also why IPv4 with $32$ bits runs out of addresses while IPv6 with $128$ bits does not: the difference is not four times but $2^{96}$ times.