Windows XP can use 4GB but only recognizes 3 GB memory. You have to trick it to use the full 4 GB that it can handle.
Find your boot INI file and add the command switch /3gb
/3GB
This switch forces x86-based systems to allocate 3 GB of virtual address space to programs and 1 GB to the kernel and to executive components. A program must be designed to take advantage of the additional memory address space. With this switch, user mode programs can access 3 GB of memory instead of the usual 2 GB that Windows XP allocates to user mode programs. The switch moves the starting point of kernel memory to 3 GB.
The OS will never display much more than 3GB system RAM.. but with the switch, your OS will use 1 GB leaving the other 3 GB free for programs.
Also another switch that augments this.. Also needs to be in the Boot INI file next to the /3GB switch
/userva
Use this switch to customize the amount of memory that is allocated to processes when you use the /3GB switch. This switch permits more page table entry (PTE) kernel memory but still maintains almost 3 GB of process memory space. Usually a setting of /userva=2900 will provide close to the maximum available number of system page table entries possible.
if possible, make sure all the memory is all the same for speed and latency.. if any is different for latency or speed, the system will error out and get frequent Blue Screens of Death.
Best to buy all 4 GB system memory at once from the same manufacturer at that being the same type. Newegg sells 4GB memory kits really cheap that will solve this problem for you.. however you will still need the /3GB switch in the Boot.ini system file.