Skip to content
BetterDL

Memory capacity

Also called: memory size, storage capacity, capacity in bits, memory capacity in bytes

The total number of bits a memory holds: number of words × bits per word, or 2ᵏ × n for k address lines and n data lines.

A memory's capacity is how much it stores in total. With k address lines and n data lines, it holds 2ᵏ words of n bits each:

capacity = 2ᵏ × n bits

That's exactly what the 2ᵏ × n notation says: a 4K × 8 memory holds 4K words × 8 bits = 32,768 bits.

To get bytes, divide by 8. Memory sizes are powers of 2, so the units are the binary prefixes: 1 KiB = 1024 bytes, 1 MiB = 2²⁰ bytes, 1 GiB = 2³⁰ bytes.

Useful habits:

  • Work in powers of 2. 64K × 16 = 2¹⁶ × 2⁴ = 2²⁰ bits. Divide by 2³ for bytes: 2¹⁷ bytes = 128 KiB.
  • Different shapes can hold the same amount. 4K × 8 and 8K × 4 both hold 32,768 bits, but they need different numbers of address and data lines.
  • Work backwards when you're given capacity: words = capacity in bits ÷ word size. That gives you the address bits.

Capacity doesn't tell you the shape of a memory, so always ask for both numbers: how many words, and how wide.

Worked examples

Example

Capacity of a 128K × 16 memory

Find the capacity in bits and in KiB.

  1. 1.

    Words: 128K = 2⁷ × 2¹⁰ = 2¹⁷.

  2. 2.

    Bits: 2¹⁷ × 16 = 2¹⁷ × 2⁴ = 2²¹ = 2,097,152 bits.

  3. 3.

    Bytes: 2²¹ ÷ 2³ = 2¹⁸ bytes.

  4. 4.

    KiB: 2¹⁸ ÷ 2¹⁰ = 2⁸ = 256 KiB.

  5. 5.

    Shortcut: 16-bit words are 2 bytes, so 128K words × 2 bytes = 256 KiB.

Example

From the pin counts

A chip has 12 address lines and 8 data lines.

  1. 1.

    Words: 2¹² = 4096 = 4K.

  2. 2.

    Capacity: 4K × 8 = 32,768 bits = 4096 bytes = 4 KiB.

Common mistakes

  • Treating K as 1000. In memory sizes, 4K = 4096, so 32K × 8 is 32,768 bytes, not 32,000.

  • Adding instead of multiplying: a 1K × 8 memory holds 8192 bits, not 1032.

  • Mixing up bits and bytes. Divide the bit count by 8 for bytes.

Practice Memory capacity

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

Learn it step by step

Memory capacity is taught in Memory.