I want use 4GB of RAM. Can I use in Windows XP 32-bit? Or should I go for Windows XP - 64-bit? Does it support 4GB of RAM?
Does Windows 7 32-bit support more than 4GB of RAM, or is >4GB support only available in Windows 7 64-bit?
If you want to utilize the full 4GB, go for 64-bit or enable PAE. I'd recommend the first option for future expansion.
You'll also want to first make sure your chipset can support the amount of memory you're installing as well.
The short answer is use 64-bit Windows 7. The 64-bit driver situation for XP is not as good (as long as you're using current hardware).
You can enable PAE for 32-bit Windows (XP through 7), but the non-Server versions specifically ignore any memory above 4GB because some drivers don't expect it, and they fail.
On 32-bit Server Windows, the driver situation is more "controlled" and therefore the extra memory from PAE is supported. Even so, you can have, for example, two "2GB" processes using the 4GB of RAM, but you cannot have a single "4GB" process, because 32-bit processes are still limited to 4GB, some of which is mapped to devices and the kernel.
Agreed = go Win 7 64 bit .. (or 'hack' the Win 7 32 bit kernel ..)
If you have to use 32bit XP, see if you can get one of the '2003 Server' versions which will allow you to address all your physical RAM ... http://msdn.microsoft.com/en-us/library/windows/hardware/gg487508.aspx
[RAM limit on MS 32bit OS is a 'marketing decision' = Linux & Mac OS on exactly the same hardware will address all the RAM.
So 32bit MS Windows XP Pro is limited to 4Gb address space of which (due to brain dead drivers causing BSOD's 10 years ago) about 750Mb was 'reserved' for I/O leaving about 3.25 Gb usable ... and MS still impose this limit today, despite the fact that (I believe) ALL current drivers are PAE 'aware' which means your REALLY only need to 'reserve' about 32Mb of low address page space for I/O ...]