HiveBrain v1.2.0
Get Started
← Back to all entries
principleMinor

Relationship between RAM size and 32-bit vs 64-bit word size

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
bitsizeandbetweenwordramrelationship

Problem

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?

Solution

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.)

Context

StackExchange Computer Science Q#49801, answer score: 7

Revisions (0)

No revisions yet.