LEDs are semiconductor diodes, electronic devices that permit current to flow in only one direction. The diode is formed by bringing two slightly different materials together to form a PN junction (Figure 2). In a PN junction, the P side contains excess positive charge ("holes," indicating the absence of electrons) while the N side contains excess negative charge (electrons).