I am trying to understand deeply how memories work in computers, and I faced the next difficulty.

Let's say we have a device with two memory chips but only one address space (for example, 0x00000000 to 0x10000000 will be memory1 and 0x10000000 to 0x20000000 will be memory2). In case an assembly code does a load/store instruction to memory2 to the address 0x10000004, who's responsible it is to change the address so it will be absolute to the memory chip? I assume that the memory chip doesn't know it's relative address space, and in our example memory2 expects a load/store from/to 0x00000004.

  • 1
    $\begingroup$ By "memory hardwares", do you mean two different RAM chips? $\endgroup$
    – D.W.
    Mar 3, 2016 at 23:58
  • $\begingroup$ Yes, can be RAM chips, flash chips and more $\endgroup$
    – TJR
    Mar 4, 2016 at 0:00

1 Answer 1


Each RAM chip (e.g., DIMM module) has its own range of physical addresses. The memory controller connects the CPU to the RAM chips via a memory bus.

In its simplest form, each read or write operation sent on the memory bus contains some bits that select which RAM chip it applies to, and some bits that indicate the address to be selected within that RAM chip. So, physical memory is partitioned among the RAM chips. The memory controller is responsible for managing this partition and determining, based on the physical address, which RAM chip to select (what to write on the chip select bits of the memory bus). The specific architectural details have evolved over time and may differ from platform to platform.

Physical addresses are normally not visible to user-level applications. Instead, a virtual memory subsystem (page tables) are used to translate from virtual addresses to physical addresses. The user-level application seems virtual addresses. There need not be any simple way that ranges of virtual memory addresses correspond to RAM chips.

  • $\begingroup$ So the processor doesn't know the real physical address it stores to? $\endgroup$
    – TJR
    Mar 4, 2016 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.