Every location in a memory has a number, its address. To read or write a word, you put its address on the address lines and the memory connects that one location to the data lines.
Three facts to hold on to:
- Addresses start at 0. A memory with N words uses addresses 0, 1, …, N − 1. The last address is one less than the number of words.
- The address is fixed, the contents change. Address 5 is always the same location; what it holds depends on the last write.
- Addresses are binary numbers on wires. With k address lines, the addresses run from all 0s to all 1s, that is from 0 to 2ᵏ − 1.
Because long binary numbers are hard to read, addresses are usually written in hexadecimal: each hex digit is exactly 4 address bits. A 12-bit address runs from 000₁₆ to FFF₁₆.
Inside the chip, an address decoder turns the address into one active word line. In a whole system, the high address bits also choose which chip responds, laid out in a memory map.