unless an anti virus program said the system has a virus, it is unclear how you can be sure you are infected.
sometimes, missing system files or corrupted system files can destabilize the system, as well as a virus could.
also a failing hard drive or loose cables or bad memory are some of the devices that can make your system unstable. and formatting the hard drive and doing a clean install will not help overcome faulty hardware.
the first thing i would try is to run a check disk, to ensure the master file table is reconciled with the files on the disk. if the master file table had become corrupted, then the o.s. can't find files needed to run the system proficiently. so a check disk will repair the mft.
it the above didn't help, the next step is to do a repair install instead of a format & clean install.
the repair will replace missing or corrupted system files with genuine ones. this will save you alot of time and heart ache with rebuilding the file system.