There are other types of memory that also need to be accessed, such as the video memory.
512mb is often used for your vram while the other 3.5 is used for your system ram.
This is an in-depth discussion of the memory limitations of 32 bit technology and why you almost never see 4 GB of RAM in 32 bit systems. Written by a recognized expert in Windows systems, Mark Russinovich.
32bit Windows can access up to 4, it’s depends on your chipset you can sometimes access 3 and sometimes 4gb of ram