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.