A power supply in which the incoming mains voltage is passed through a switch that is switched on and off at a very high frequency, which may be tens to thousands of kilohertz. This effectively produces a high-frequency waveform, which can then be transformed to lower voltage, rectified, and smoothed to produce a DC output voltage. The advantage over power supplies that operate at the mains frequency is that the transformers can be made much smaller, as the losses are much reduced at high frequency. The transformer cost is a significant fraction of the complete power supply, so using switched-mode techniques can offer considerable cost savings. Problems include high-frequency noise produced by the switching devices, which must be filtered.