A diode is a type of electrical device that conducts the current only in one direction. The direction is defined from anode to cathode. In other words, it is the simplest of the two terminal unilateral semiconductor devices. It permits the current to flow in one direction and at the same time it also blocks the current that flows from the opposite direction. The two terminals of the diodes are known as anode and cathode. A diode can be closely related to a switch. Mainly there are two types of semiconductor diodes –