1) A 32-bit CPU reserves some of the physical addresses for I/O devices. For example a graphics card with lots of memory can use up a lot of addresses that would otherwise be available to access system RAM.
2) The Windows architecture reserves the top 2GB of virtual memory space for the operating system. (Note that virtual memory space applies to the addresses that can be used by the program, not to physical memory). This means that 32-bit programs themselves can't be bigger than 2GB.
There is an exception to (2) - if the program declares itself to be "LARGE_ADDRESS_AWARE" then the virtual memory space is reallocated as 3GB for the program and 1GB for the OS. Such programs can use up to 3GB of virtual memory (and they can actually use all 4GB of the virtual 32-bit address space if they're run on a 64-bit operating system).
basically without arguing about special cases like crazy server OS modifications and features.
a regular 32bit os such as windows 7, vista or xp
can only ADDRESS 4GB of memory.
out of that 4GB you have to have room for video memory and some other devices etc.
so if you have 3GB memory installed its fine, but when you have 4GB installed memory some of the memory addresses are used instead for video memory etc.
which is why even with 4gb you can only usually use about 3.15-3.25GB in windows 32bit.