32bit cpu: how much memory can it use? [closed]

2019-09-21 02:52发布

问题:

now i know this question has been asked quite a few times now but i'm not really wondering how much memory a 32bit processor can address neither theoretically nor practically. just a quick heads up, i come from a civil engineering background so i'm still learning in terms of computer science; and also units of measure are a big deal for me which is actually my question:

now i know you can calculate how much memory a cpu can use by doing 2^32 (or 64) and in this case you get 4.294.967.296 bits. now i know (or i think i know) memory is measured in bytes, so in order to find out how many bytes of memory a cpu can use i divide 4.294.967.296/8 and you get 536.870.912 bytes. then you divide 536.870.912/1024 and you get 524.288 kilobytes. then you divide 524.288/1024 and you get 512 megabytes. then you divide 512/1024 and you get 0,5 gigabytes which is... not great.

now i noticed that if you don't divide by 8 at the beginning you get 4 gigabits; so my question is: is ram measured in bits or bytes. and if it's byes then what is the relationship between cpu address bits and ram capacity?

EDIT: hey, i managed to understand how the units of measure work. basically you have 4.294.967.296 addresses from 0x00000000 to 0xffffffff and each address represents 4 bytes of data. then you divide by 1024 and get 4.194.304 kbytes, 4.096 mbytes and 4 gbytes. sorry it took this long, thanks to all for the feedback.

回答1:

A memory is made by a number of read-writable items, called words.
Each items is given an unique number, called address.

The CPU has a fixed number of bits/pins to represent an address.
One bit can present the addresses 0 and 1.
Two bits represents at most 00, 01, 10, 11.
Three bits represents... well you got it.

Each bit has two values, each bit is independent of the others, so each time you add a bit you double the number of values (just take all the old values and put a 0 in front of them, do it again with a 1 and you get as twice as the old values).
So n bits are 2n possible values, 2n possible words.

If the CPU has at most these number of bits to present an address (culprit: the size of a register doesn't have to match the number of bits of an address. 32-bit CPU can have 36-bit addresses for example) it can access at most that much words of memory.

A word of memory can be any non zero size. Literally, any size. Including 1-bit or 14-bit or 8-bit.
The most diffused architecture on the marked, the x86, use words of 1 byte (so with 32-bit addresses it can access 232 = 4GiB) but this is in no way a general rule.



回答2:

32bit CPU has 32bit address registers and can address up to 4GB memory (bytes not bits). But there are also segment registers. Each segment may have up to 4GB memory. 64K segments * 4GB = terabytes. Practically this cannot be done with any OS, e.g. Windows 7 does not use multiple segments and 4GB is the maximum.



回答3:

I once had a core2 duo Intel processor, and 2 Gigabyte RAM installed in my machine, I had installed another RAM with 4 Gigabyte but Windows couldn't used the full added space, and all usable RAM is 2.9 Gigabyte. usable RAM with 32 bit processor



标签: memory cpu bit ram