With what you have for your spec's windows XP 32 bit service pack 3, Vista 32 or 64 bit service pack 2, and windows 7 32 or 64 bit service pack 1. Any of those OS will work with your specs.
As stated above the games of today will not work very well with that CPU and only 4 gigs of RAM. Then it all depends on what your Graphics card (GPU) is and what your Power Supply (PSU) as well.
The PC you have in front of you is good for work video and video editing and surfing and some flash gaming. But to Play BF3 you would have to be on the lowest settings as possible and even then it might not work right. Good luck to you.