Skip to content
BetterDL

Memory map

Also called: address map, memory mapping, system memory map

A table or diagram showing which device or chip occupies each range of a system's address space, with the start and end address of every block.

A processor sees one long address space. A memory map shows who owns each part of it: which addresses belong to RAM, which to ROM, which to I/O devices, and which are empty.

Each entry is an address range: a first address, a last address, and the device. For example, in a 16-bit space:

  • 0000₁₆–7FFF₁₆: 32K RAM
  • 8000₁₆–8FFF₁₆: 4K I/O
  • 9000₁₆–DFFF₁₆: unused
  • E000₁₆–FFFF₁₆: 8K ROM

The map is more than documentation. Each block's chip select comes straight from it: the address bits above the chip's own bits are fixed across its block, and ANDing them gives the select. Blocks start at multiples of their size, which keeps those fixed bits clean.

When every high bit is checked, each address belongs to at most one device (full address decoding). Checking fewer bits makes a device appear at several places in the map.

Microcontroller datasheets begin with exactly this kind of table, placing flash, SRAM and each peripheral at fixed addresses.

0000100
0001100
0010100
0011100
0100100
0101100
0110100
0111100
1000010
1001000
1010000
1011000
1100000
1101000
1110001
1111001

Worked example

Example

Chip selects from a map

Use the map above (16-bit addresses).

  1. 1.

    RAM, 0000₁₆–7FFF₁₆: 32K = 2¹⁵, so A14–A0 vary. A15 = 0. CS = .

  2. 2.

    I/O, 8000₁₆–8FFF₁₆: 4K = 2¹², so A11–A0 vary. A15–A12 = 1000. CS = .

  3. 3.

    ROM, E000₁₆–FFFF₁₆: 8K = 2¹³, so A12–A0 vary. A15–A13 = 111. CS = .

  4. 4.

    Address 8123₁₆: A15–A12 = 1000 → the I/O block.

Common mistakes

  • Ending a block at the next block's first address. An 8K block at E000₁₆ ends at FFFF₁₆, one before 10000₁₆.

  • Including the chip's own varying bits in its select. Only the bits that are fixed across the block belong there.

  • Leaving a gap unaccounted for. Unused ranges should be shown, so nobody assumes an address is there.

Practice Memory map

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

Learn it step by step

Memory map is taught in Memory and Basic CPU / Computer Architecture.