Computer Science
Intermediate

Address Space

Number of addressable locations for n bits.

Formula

N=2nN = 2^n

Live Calculator

Members

Variables

nAddress bits

Example

32-bit = 4.29 billion

How it works

Each address bit can take one of two values, 0 or 1, so n bits produce 2 × 2 × ... × 2 possible patterns, which equals 2^n. Each unique bit pattern can label one distinct memory location, so the total number of addressable locations is the number of possible addresses. This is why increasing the number of address bits doubles the address space each time you add one more bit.

When to use it

Use this when calculating how many memory cells, bytes, or other locations a CPU or system can directly name with a given number of address bits. It is also useful when converting between address width and memory capacity in architecture, operating systems, and embedded systems.

Worked example, step by step

Suppose a system has 20 address bits. N = 2^n N = 2^20 N = 1,048,576 So the address space contains 1,048,576 distinct locations.

Common mistakes to avoid

  • Using n instead of 2^n, which undercounts badly
  • Forgetting that each added address bit doubles the number of locations
  • Confusing addressable locations with total memory size without checking whether each location is a byte or a larger unit

Did You Know?

A 32-bit system can address only about 4 gigabytes, the very reason the world moved to 64-bit computing.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026