Electricity is transported through power lines alternating current (AC). AC electricity switches directions continuously, going from positive to negative and back again. Most electronic devices require direct current (DC) electricity, meaning the electricity always flows in the same direction. A rectifier is a device that turns AC into DC. Half-wave rectifiers are the simplest devices that perform this function.
The AC power is first put through a transformer. A transformer consists of two coils of wire sitting right next to each other. When AC electricity moves through the first coil, it creates a moving magnetic field that encompasses the coil as well. This field produces an electric current in the second coil. Transformers are use to isolate the output current being rectified from the input current. They can also be used to change the voltage of the output current.