A power supply that is guaranteed to provide correct working voltages to the circuits of a computer in spite of interruptions to the incoming electrical power supply from the grid. Short-duration interruptions may be dealt with by a device that takes energy stored in a battery and supplies it to the computer at the correct AC voltage, using a fast switchover from the incoming to the battery power supply. For longer-duration interruptions other means may be employed.