|Function as the electronic version of a one-way valve, by restricting the direction of movement of charge carriers. It allows an electric current to flow in one direction, but blocks it in the opposite direction. Diodes have two electrodes called the anode and the cathode. Diodes are used especially as rectifiers, which change alternating current into direct current, and to vary the amplitude of a signal in proportion to the voltage in a circuit. The most familiar diodes are vacuum tubes and semiconductor diodes. Diodes are primarily used as switching devices and for converting ac voltages to dc voltages.