Memory Address Space Calculator Formula

Understand the math behind the memory address space calculator. Each variable explained with a worked example.

Formulas Used

Total Addressable Memory

total_bytes = total_locations * bytes_per_location

Memory (KB)

total_kb = total_locations * bytes_per_location / 1024

Memory (MB)

total_mb = total_locations * bytes_per_location / 1048576

Addressable Locations

address_locations = total_locations

Variables

VariableDescriptionDefault
address_bitsAddress Bus Width (bits)16
data_bus_bitsData Bus Width (bits)8
total_locationsDerived value= pow(2, address_bits)calculated
bytes_per_locationDerived value= data_bus_bits / 8calculated

How It Works

Memory Address Space

The address bus width determines how many unique memory locations a processor can access.

Formula

Locations = 2^Address_Bits

Total Memory = Locations x (Data_Bus_Width / 8) bytes

Common Examples

  • 8-bit address: 256 bytes
  • 16-bit address: 64 KB
  • 20-bit address: 1 MB (original PC)
  • 32-bit address: 4 GB
  • 64-bit address: 16 EB (theoretical)
  • Worked Example

    16-bit address bus with 8-bit data bus.

    address_bits = 16data_bus_bits = 8
    1. 01Locations: 2^16 = 65,536
    2. 02Bytes per location: 8/8 = 1
    3. 03Total: 65,536 x 1 = 65,536 bytes
    4. 04In KB: 65,536 / 1024 = 64 KB

    Ready to run the numbers?

    Open Memory Address Space Calculator