Address Space
Number of addressable locations for n bits.
Live Calculator
MembersVariables
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
More in Computer Science
View allShannon Entropy
AdvancedAverage information content of a random source (bits).
Master Theorem (form)
AdvancedAnalyzes running time of divide-and-conquer algorithms.
Hamming Distance
AdvancedNumber of positions at which two strings differ.
Bits to Represent n
BasicMinimum number of bits to represent n distinct values.
Binary to Decimal
BasicConverts a binary number to decimal.
Nodes in a Full Binary Tree
IntermediateTotal nodes in a perfect binary tree of height h.