A memory with k address bits needs 2ᵏ selections. A single k-to-2ᵏ address decoder for a million words would be enormous. Two-dimensional decoding fixes that by arranging the cells as a roughly square grid.
- Some address bits drive a row decoder, which activates one word line.
- The other bits drive a column decoder, which picks one column.
- The cell at the crossing of the chosen row and column is the one accessed.
The savings are dramatic. For 1024 × 1 bits as a 32 × 32 grid:
- one decoder: 1024 outputs
- two 5-to-32 decoders: 32 + 32 = 64 outputs
In general, splitting k bits evenly gives 2 × 2^(k/2) outputs instead of 2ᵏ.
Real DRAM and SRAM chips are organized this way. In DRAM it also explains why refresh works a row at a time: activating a word line reads and restores a whole row together.