Computer turning off and on
Hello everyone, i have a problem with my PC i've never came across before and i've tried everything and i still can't solve it. My PC turn's off by itself while i'm working on it most of the times it turns right back on, i thought it was the cmos battery, i changed it still was doing it, then the power supply came to mind since i have alot of hardware in my tower with just a 300 watts power supply, so i changed it to a new 500 watts power supply still does it, i've reformat my hard drive and it still does it. What else can i do? Have anyone else had this problem?