To understand LEDs, let's first take a look at the mechanism by which light exposure produces an electric
current, such as in solar batteries.
Semiconductors, a term you probably hear daily, are a key component of electric circuits, including computers,
and they are commonly made from silicon. Semiconductors either use "n-type" silicon, in which there
are extra electrons, or "p-type" silicon, in which there are missing electrons that form "electron
holes" or simply "holes." Combining these two types of silicon produces a "pn junction diode."
When the pn junction is exposed to light, the p-type silicon becomes an anode and the n-type silicon a cathode.
Attaching electrodes to either side and then connecting them to an external electrical conductor produces a current.
This is also the principle behind solar batteries.