A diode allows electricity to flow in one direction only and blocks the flow in the opposite direction. They may be regarded as one-way valves and they are used in various circuits, usually as a form of protection. There are different types of diode but their basic functions are the same. These are noted below along with examples of diodes in use.