Learn about the address bus, its function in CPU-memory communication, and its importance in digital electronics.
The address bus is the set of lines through which the processor indicates which memory location or which input/output device it wants to read from or write to. Unlike the data bus, it is usually unidirectional: addresses are generated by the processor (or by a direct memory access controller) and sent to memories and peripherals. The number of lines determines the number of locations the system can address [1][2][3][4].
With $n$ address lines, $2^n$ combinations can be formed, thus $2^n$ distinct locations. If each location contains one byte, the addressable memory is $2^n$ bytes:
- $16$ lines: $2^{16} = 65\,536$ bytes, i.e. $64\ \mathrm{KiB}$.
- $20$ lines: $2^{20}$ bytes, i.e. $1\ \mathrm{MiB}$.
- $24$ lines: $2^{24}$ bytes, i.e. $16\ \mathrm{MiB}$.
- $32$ lines: $2^{32}$ bytes, i.e. $4\ \mathrm{GiB}$.
Each added line doubles the addressing space [1][2][3].
The addressing space is divided into zones assigned to read-only memory (ROM), read-write memory (RAM), and input/output device registers. In memory mapping, input/output devices occupy addresses within the same memory space; alternatively, some processors use a separate space with dedicated instructions. The high bits of the address, interpreted by a decoder, select the device; the low bits select the cell within it [1][2][4].
The address signal must arrive stable at the devices before the read or write signal. The decoding time and memory access time contribute to the cycle time. If a device is slower than the processor, wait states are inserted. With partial decoding, where some high bits are ignored, the same device appears at multiple addresses (space reflection), which simplifies the circuit but wastes space [1][2][3].
To reduce the pins of integrated circuits, in some processors the address and data lines share the same pins at different times. A signal indicates when the lines carry the address, and an external latch stores it to keep it stable while the same lines carry the data [1][2][4].
1. Memory of $32\ \mathrm{KiB} = 2^{15}$ bytes: $15$ address lines are needed ($A_{14}, \dots, A_0$).
2. System with $16$ address bits with $8\ \mathrm{KiB}$ ROM at the highest addresses: the ROM occupies from $\mathrm{0xE000}$ to $\mathrm{0xFFFF}$ and is selected when $A_{15}A_{14}A_{13} = 111$.
3. $32\ \mathrm{KiB}$ RAM at the lowest addresses: from $\mathrm{0x0000}$ to $\mathrm{0x7FFF}$, selected with $A_{15} = 0$.
4. With $20$ lines, $1\ \mathrm{MiB}$ is addressed and with $24$ lines $16\ \mathrm{MiB}$.
5. To go from $64\ \mathrm{KiB}$ to $4\ \mathrm{GiB}$, $16$ additional lines are needed, that is from $16$ to $32$.
The address bus is present in every processor-based system: microcontrollers with external memory, computers, embedded systems, and expansion boards with mapped memories and peripherals.
[1] Wikipedia (it): Bus (informatica)
[2] Wikipedia (en): Bus (computing)
[3] Wikipedia (en): Memory address
[4] Wikipedia (fr): Bus de données
Generating summary…