This topic covers how a p-n junction converts between light and electrical energy. An LED turns forward-bias current into light and needs a direct band gap. A photodiode turns incident light into a photocurrent, usually under reverse bias, and is described by its quantum efficiency and responsivity. A solar cell turns light into electrical power delivered to a load, and is described by its I-V curve, open-circuit voltage, short-circuit current, fill factor and efficiency. All three rest on the photon energy E=hc/λ compared with the band gap Eg, so keep energies in eV, use hc/q≈1240 eV⋅nm, and fix the current sign convention before solving.