|You have a few issues to consider:|
1. if you're running a 32-bit version of Windows, it's pointless to run more than 4GB of RAM. And in reality, there's probably no point in running more than 3GB because of the way Windows deals with the VAS (virtual address space). I wrote this explanation a while ago:
2. up until the Athlon 64 & P4 were released, the optimal CPU:DRAM frequency ratio was 1:1. The term "frequency" is important. A P4 that runs at 800MHz FSB actually runs at 200MHz frequency. "DDR2 400MHz" (as you put it) also runs at 200MHz frequency, so your system is already running at 1:1 ratio. However, this ratio is NOT optimal for a P4 because of the inefficiency of the P4's "netburst architecture". With a P4, it's recommended to run the RAM frequency faster than the CPU frequency to help make up for that inefficiency. P4's that run at either 400MHz FSB or 800MHz FSB should be run with a 3:4 ratio....P4's that run at 533MHz FSB should be run with a 4:5 ratio.
So to wrap it up, the ideal RAM configuration for your 800MHz P4 with a 32-bit OS would be: 3GB DDR2-533 (2 x 1GB + 2 x 512MB). Any other configurations is less than optimal & *may* result in a performance hit.
That being said...if it was my system, I wouldn't waste my money replacing ALL the RAM. If anything, I would just add another 1GB (2 x 512MB) & be done with it. It wouldn't matter if the new RAM was DDR2-400, DDR2-533, DDR2-667, DDR2-800, etc because the DDR2-400 that you have now will automatically force the new RAM to peform at DDR2-400 speed (200MHz frequency).