A semiconductor device that converts alternating current energy into direct current energy. Usually it contains a PN junction with two terminals, positive and negative. The most important characteristic of a diode is its unidirectional conductivity. In a circuit, current can only flow in from the positive pole of the diode and out from the negative pole.