The basics of memory addressing in XP or Vista 32-bit:
The total number of system address space happens to exactly equal the amount of address space needed by 4GB of physical memory.
However, onboard devices / resources (NB/SB chips, parallel/serial ports, NIC, etc.) also need address space, as do PCI/PCIe/AGP cards. Devices & resources are allocated address space from the top of the pool, down. This works out to (depending on the specific system) to (typically) 3.12~3.5GB worth of space left. 3.5 is a rare high number; some system configs put that number as low as 2.9GB.
And, the gotcha: onboard memory on a videocard also needs address space. This is also allocated from top-down, after system resources.
So: 4GB (equivalent) address space - resources = 3.12GB available - vidcard memory (lets say 256MB, unless he's got a 512MB frame buffer) = 2.87GB available space. Increase the frame buffer (or, especially, run SLI/Crossfire), and the number shrinks further. Sucks for the people with a pair of 768MB buffers, as they can't even address 2GB RAM.
The math: each bit of memory on that stick requires an address. 8 bits/byte, 1,024 bytes/KB, and so on.
But, so does each bit of memory on that videocard.
32 bit = 34,359,738,368 addresses.
64 bit = 1,099,511,627,776 addresses.
chart to explain it better:
See that yellow area? As you add more onboard devices (or, more videocard RAM), it grows. Down.
As it grows, the grey area (RAM address pool) gets smaller. Smaller it gets, the less RAM you can address.
And, good read (with layman's terms!), found by Nastymanhttp://www.dansdata.com/askdan00015.htm
*Edit: with 4GB RAM installed, Vista x86 SP1 will show all four gigs in System Properties; however, Task Manager (as well as most system-monitor utilities) will continue to show only that RAM that's actually addressable by the system. So, if the BIOS and System Properties show 4GB, but Task Manager only reports, say, 2.8GB, that's normal.
(updated 5 July 2008)
*Edit (16 Sep 09):
Sovereign installed Win7 (x86) on one of his machines, which has 4GB RAM installed.
The Resource Monitor (in Task Manager) gives a very good graphical representation of where, exactly, The Missing RAM went:
The "Hardware Reserved" shows the exact amount that was mapped to Memory-Mapped I/O devices (like ATI HyperMemory, PCI devices and the like).