I know that x86 supports only 4GB of RAM, and that switching to x64 greatly increases the size of RAM you can use, but I don't understand why. Why is the maximum supported ram size related to whether the processor is 32-bit or 64-bit?

  • $\begingroup$ This seems to be about arbitrary design choices of real-world hardware. Hence, I don't see a computer science question here. Community votes, please! $\endgroup$ – Raphael Nov 22 '15 at 8:50
  • $\begingroup$ This is probably easily researched on the internet. Where have you looked and why did the answers not satisfy you? $\endgroup$ – Raphael Nov 22 '15 at 8:52

x86 is a 32-bit processor. Memory addresses for x86 are 32 bits. Each byte has a different address, so a 32-bit address means that you can only address up to $2^{32}$ bytes of memory. $2^{32}$ bytes is 4GB. That's why 32-bit processors are limited to 4GB of memory (per application). In particular, each application can use only 4GB of memory. (Technically, due to the way paging works, you can have more than 4GB of physical memory, but each application will still be limited to 4GB of physical memory.)

In contrast, a 64-bit processor can use 64-bit memory addresses, which allows addressing a huge amount of memory. This has freed computers up to have more memory: they are no longer limited to 4GB of addressable memory. (Technically, x86_64 has 48-bit addresses -- the high 16 bits of the 64-bit address basically can't be used -- but $2^{48}$ bytes of memory is still a humongous amount of memory, about 256 TB of memory. That's more than anyone is likely to want to buy for now.)

  • $\begingroup$ I believe x86-64 requires sign extension not zero extension for the most significant bits. $\endgroup$ – Paul A. Clayton Nov 22 '15 at 1:07
  • $\begingroup$ @PaulA.Clayton, OK, I'll edit the answer accordingly.. I know, that was a detail that is not really relevant to the question and I didn't really want to go into for risk of causing confusion, but maybe the little white lie caused even more confusion. Fixed. $\endgroup$ – D.W. Nov 22 '15 at 2:24
  • $\begingroup$ "That means that memory addresses are 32 bits. Each byte has a different address" -- since these are arbitrary implementation decisions (one could use more than one register for addresses, and address only words, blocks, ...) I think this is offtopic here. $\endgroup$ – Raphael Nov 22 '15 at 8:49
  • $\begingroup$ "x86 is a 32-bit processor. That means that memory addresses are 32 bits." I don't agree at all. A 8080 was a 8-bit processor, that did not prevent its addresses to be 16 bits. A 8086 was a 16-bit processor, that did not provent its adresses to be what? That depends how to you count, 20 or 32 bits. And the variation existed in the other direction, the PDP-10 was a 36-bit computer, its addresses were 18 bits (for the first model, the later was were extended and I don't remember to how much. And that is without starting looking at non-ISA aspects but more implementation one (PEA, etc.) $\endgroup$ – AProgrammer Dec 1 '15 at 14:31
  • $\begingroup$ @AProgrammer, OK, I've edited my answer to make a narrower statement. Thank you for the feedback. $\endgroup$ – D.W. Dec 1 '15 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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