Run memtest86 and confirm if RAM is the problem or not. No point in wasting time formatting or wasting money buying new hardware until you know what the problem actually is.
Most likely, RAM. Could be motherboard though. Or a shoddy hardware driver. Hence, we test and find out which.
where can i find memtest 86