Why is the maximum memory limit of 32-bit operating system 4GB?

Although it is very simple knowledge, but ask the people around, there are still some don't know ~

Let me spread the word about Daji here

Because the address space of the 32-bit operating system is 32 bits, the total number of addresses is 2^32, and each address corresponds to 1Byte memory space, so the maximum memory space managed by the 32-bit operating system is limited to 2^32Byte=2^32Byte=4 ^ 1024^1024^1024Byte, ie

4,294,967,2964,294,967,296 bytes equals 4GB. 

 In addition, add a point, 1Byte=8bit, that is, each address corresponds to 8 bits in memory, which is why the size of the smallest variable char variable in a C++ program is 1Byte.

2 to the power of 32 bytes is equal to 4,294,967,2964,294,967,296 bytes, converted to GB needs to be divided by 1024^3

Equal to 10243232 GB≈4 GB

Therefore, 2^32 bytes is approximately equal to 4GB.

Guess you like

Origin blog.csdn.net/m0_64880608/article/details/130376812