lets see if the processor is 32bit
the maximum memory it can handle is 4294967296B
that's 4GB of memory.
how is this possible ?
can you please explain it, in an easy way ?
Thanks.
If a process has a 32-bit memory bus, each bit of that bus can be in 2
possible states. With 32 address lines, each with 2 possible states,
there are 2^32 different possible addresses the bus can request. If
the addresses are byte addresses, then the CPU can address 2^32
different memory addresses.
However, typical 32-bit processors don't have 32-bit physical memory
buses. And calling a process a "32-bit processor" generally refers to
the operand word size, not the address bus size.
DS
Assume you have 1-bit addresses. Then you have two addresses, 0 and 1.
So you can have two memory slots, one at "address" 0, and another at
"address" 1.
Now, if you had 2-bit addresses, you would have four addresses: 00, 01,
10, and 11.
With 3-bit addresses, you'll get eight addresses: 000, 001, 010, 011,
100, 101, 110, and 111.
And so on...
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
...
2^32 = 4294967296
So when you reach 32-bit addresses, you can have 2^32 = 4294967296
memory slots.
Note that the amount of data stored in these memory slots is independant
of the size of the addresses. You may have any number of bits stored in
a memory slot.
In processors such as the 680x0 or ix86, you have 8-bit per memory
slots. But with other processors, you could have have 18 bits or 36
bits or 32 bits, or any number of bit really per memory slot.
But this is only the directly accessible memory. The computer may have
more memory available, and accessible indirectly, thru a memory
management unit, or with some simple paging hardware, with which the
processor can switch the accessible part of the memory (or "bank") by
setting some bits in some register.
And in addition, there could be permanent storage devices, such as a
hard disk, and the operating system could implement memory swapping,
where it stores memory temporarily not used to the disk and loads from
the disk data that it needs to use. So the addressable memory is not a
limit of the memory usable by the processor, you have to include the
swap memory. And why not, also the file system, and even the whole
Internet can be consired memory for a processor, as soon as it has a
network interface.
See also http://en.wikipedia.org/wiki/Memory_address
http://courses.cs.tamu.edu/rgutier/ceg411_f01/l16.pdf
--
__Pascal Bourguignon__
http://www.informatimago.com