Skip to content
BetterDL

Address bits

Also called: address lines, number of address bits, address width, address pins, address bus width, address bus

The bits of a memory address. k address bits select one of 2ᵏ words, so N words need the smallest k with 2ᵏ ≥ N, which is log₂N rounded up.

A memory receives its address on k address lines, one bit per line. k bits can make 2ᵏ different patterns, so k lines can pick out 2ᵏ words.

  • 3 bits → 8 words
  • 10 bits → 1024 words (1K)
  • 16 bits → 65,536 words (64K)
  • 20 bits → 1M words

Going the other way: N words need the smallest k with 2ᵏ ≥ N. That is log₂N, rounded up. 1000 words need 10 bits; addresses 1000–1023 just go unused.

The rule that catches people: address bits count words, not bits or bytes. If a question gives the capacity in bits, divide by the word size first, then take log₂.

A mental shortcut for sizes written with K, M or G: split the number. 16K = 2⁴ × 2¹⁰ = 2¹⁴, so 16K words need 4 + 10 = 14 address bits. Add 20 for M and 30 for G.

The same counting appears with select lines on a multiplexer and the inputs of a decoder: in every case n bits choose one of 2ⁿ things.

1
512
1
256
1
128
1
64
1
32
1
16
1
8
1
4
1
2
1
1

Worked examples

Example

Words to address bits

How many address bits for 3000 words, and for 16K words?

  1. 1.

    3000: 2¹¹ = 2048 is too small, 2¹² = 4096 is enough. So 12 bits.

  2. 2.

    16K: 16 × 1K = 2⁴ × 2¹⁰ = 2¹⁴. So 14 bits.

  3. 3.

    The diagram shows 10 address bits all set to 1: the last address of a 1K memory, 1023.

Example

Capacity to address bits

A chip stores 262,144 bits as 32-bit words. How many address lines?

  1. 1.

    Words = bits ÷ word size = 262,144 ÷ 32 = 8192.

  2. 2.

    8192 = 2¹³, so 13 address lines.

  3. 3.

    Check: 2¹³ × 32 = 2¹³ × 2⁵ = 2¹⁸ = 262,144 bits. ✓

  4. 4.

    Taking log₂ of the bits would give 18, which is 5 too many (log₂ 32 = 5).

Common mistakes

  • Rounding down. 9 bits address only 512 words, so 600 words need 10.

  • Taking log₂ of the bits or bytes. Convert to words first, unless each word is exactly one bit or one byte.

  • Multiplying instead of raising to a power. 16 address lines give 2¹⁶ = 65,536 words, not 16 × 16.

Practice Address bits

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Address bits is taught in Memory.