0
$\begingroup$

To my knowledge,

The number of CPU registers can tell us the maximum RAM we can have. I am only talking about physical memory, no virtual memory or virtualization in my question.

A 32-bit CPU architecture with 32 registers, each one bit, can give us 2^32 = 4GB RAM (a bit, which is either true or false, times how many registers we have)

What confuses me is that, for example, Intel 32-bit CPUs have 8 General Purpose Registers, which is not equal to 2^32, but 2^8, because 4GB is user data; that is why it should be general purpose registers in my opinion.

What also confuses me is that 2^32 = 4GB RAM does not consider any single register from the 32 registers to be used as an instruction set to manipulate register data, as all 32 registers are for 4GB RAM data usage.

I do not hold a CS degree, but I am curious about low-level stuff that is usually abstracted from the user.

Thanks!

$\endgroup$
1

1 Answer 1

3
$\begingroup$

There is absolutely no causal relation between number of registers and maximum amount of RAM. Relation between register size and RAM is limited because x86 16 bit processors had segment registers which made much more addres space available. And then the RAM that you have can exceed the address space, for example some Intel processors allowed 4GB address space per process, but up to 64 GB of RAM. That would make sense for a server chip that has 100 processes running at the same time.

$\endgroup$
3
  • $\begingroup$ Does that mean hardware 4GB RAM size limit for 32-bit processors is a common misconception? and modern Windows 32-bit OS for example can have more than 4GB but only if max 4GB RAM is used per process? and the home user Windows 32-bit OS 4GB limit is software locked by Microsoft? Thanks! $\endgroup$ Oct 13, 2023 at 7:11
  • $\begingroup$ @AhmadAddas: The 64 GB limit has been lifted many years ago, with 64 bits processors. The new limit is determined by what will physically fit in your computer. The 4 GB limit for 32 bits Windows is because you use 64 bits Windows for machines with >4GB RAM. $\endgroup$
    – MSalters
    Oct 13, 2023 at 8:56
  • $\begingroup$ @AhmadAddas There's a processor feature called PAE, which allows up to 64GB RAM on a 32-bit processor. Nobody really cared about it because 64-bit processors are better. $\endgroup$
    – user253751
    Oct 17, 2023 at 13:38

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.