32 bit versions of windows can not recognize 4 GB of RAM. It is the architecture of windows; you can't change this.
64 bit versions of windows will recognize up to 8GB of RAM, provided the motherboard supports it.
http://www.fnode.com/2007/12/4gb-ram-on-32-bit-operating-system/