We have one more piece to drop into place: light. Because it is fundamentally electromagnetic radiation (Maxwell), and because it is fundamentally a stream of photons (Planck/Einstein), and because semiconductors absorb and emit it (band-gap quantum mechanics), light sits at the intersection of every theme in this chapter. It is also the basis of optical communications, fiber lasers, LED lighting, every camera ever made, photovoltaic solar cells, and a particularly powerful family of hardware-security attacks.
5.1 Three ways an atom or semiconductor interacts with light
Absorption. A photon of the right energy hits an atom or a semiconductor; an electron jumps from a lower level to a higher one, the photon vanishes, its energy now stored in the excited electron. In a semiconductor, this often means an electron gets knocked from valence band to conduction band — generating an electron-hole pair. This is how every photovoltaic solar cell, every camera CMOS sensor, and every photodiode works.
Spontaneous emission. An excited electron sits there for a while, then randomly decays to a lower level, releasing the energy as a photon. The direction is random; the timing is random; the photons are all about the same energy but with no particular phase relationship. This is how an LED works — and also a regular incandescent bulb, the sun, a candle, and your body in the infrared.
Stimulated emission. This is the magic ingredient in a laser. Einstein realized in 1917 that an incoming photon, of exactly the right energy, can stimulate an excited atom to emit a clone photon — same direction, same phase, same wavelength. Two photons exit where one entered. If conditions are arranged right, you get an exponential cascade: amplification of light by stimulated emission of radiation. LASER.
5.2 What makes a laser a laser
For stimulated emission to dominate over the random-spontaneous variety, you need more atoms in the excited state than in the ground state — a condition called population inversion. This does not happen naturally; you have to pump energy in continuously to maintain it.
A laser also typically has an optical cavity — a pair of mirrors at either end of the gain medium. Photons bounce back and forth, each pass amplifying through more stimulated emission. One of the mirrors is partially transparent; a fraction of the light leaks out as the laser beam.
The result has three remarkable properties:
- Monochromatic. Essentially one wavelength, set by the energy gap of the lasing transition.
- Coherent. All photons in phase.
- Directional. Tightly collimated beam, not a fan-out like a regular bulb.
5.3 Types of lasers and where they live in your hardware
- Helium-neon laser. The classic red lab laser, 632.8 nm. Mostly historical; replaced by laser diodes for almost all uses.
- Semiconductor laser diode. A specially fabricated diode where forward-biased current pumps the population, and the cleaved facets of the chip itself form the optical cavity. Tiny (mm-scale), efficient, mass-producible. Found in: optical fiber transmitters, CD/DVD/Blu-ray drives, laser pointers, barcode scanners, LiDAR for self-driving cars, optical computer mice.
- Fiber laser. A long stretch of doped optical fiber pumped by laser diodes — the fiber itself is the gain medium. Used in industrial cutting (steel, titanium) and medical surgery.
- CO₂ laser. Big, infrared, used to cut wood and acrylic in laser cutters.
- Quantum cascade laser. Mid-infrared, used in spectroscopy and trace-gas detection.
5.4 Photon energy and silicon: why CMOS image sensors work
Photon energy is , with Planck's constant, the speed of light, the wavelength. Plug numbers: a 500-nm green photon has about 2.5 eV of energy. Silicon's band gap is 1.12 eV. Therefore green photons easily kick electrons across the gap. This is exactly how the CMOS sensor in your phone camera works. Each pixel is a small photodiode in reverse bias; incoming photons create electron-hole pairs that separate in the photodiode's electric field and accumulate as a tiny stored charge proportional to the number of incident photons. After the exposure, an ADC reads each pixel's charge, and that becomes one number in your image array.
Conversely, infrared photons below silicon's band gap (around 1100 nm and longer) cannot be absorbed — silicon is transparent to mid-IR. This is why some cameras have IR-cut filters glued in front of the sensor: silicon would happily detect IR, distorting colors, so a filter blocks it.
5.5 LEDs: the inverse of a photodiode
An LED is the same physics in reverse. Run forward current through a diode made of direct band-gap material (GaAs, GaN, InP), and electrons recombining with holes release their energy as photons. The wavelength is set by the band gap: . Tune the alloy composition to tune the color. Red LEDs use GaAlAs (around 1.9 eV gap, 650 nm); green and blue use various GaN alloys (2.4 to 2.8 eV); ultraviolet LEDs use AlGaN (above 3 eV). White LEDs are typically blue LEDs with a yellow phosphor coating that re-emits the blue partly as yellow, and the human eye perceives the mix as white.
Note: silicon is a poor LED material because it is indirect band-gap — when an electron and a hole recombine in silicon, they almost always lose their energy as heat (vibrations) instead of photons. This is why your CPU lights up only when on fire; it does not radiate visible light during normal operation, even though it is constantly recombining electron-hole pairs.
5.6 Hardware-security relevance of light
- Optical fault injection. Decap a chip (remove its plastic package, exposing the silicon), focus a laser pulse on a specific transistor or memory cell. The laser's photons generate electron-hole pairs precisely there, briefly flipping the cell's state. Used to bypass authentication checks in secure microcontrollers. Mitigations: opaque die coatings, on-chip light sensors, redundant computation.
- UV erasure of fuses. Old EPROM chips were erased by 254 nm UV light shining through a quartz window. Some early "secure" microcontrollers used UV-erasable fuses; attackers could expose the chip to UV for the right amount of time to clear the security fuse without erasing the firmware.
- Optical TEMPEST. Some old IBM keyboards (and other electronics) had LEDs that were dimly modulated by the system bus. A telescope across a parking lot could pick up the modulation and reconstruct the data. Modern devices avoid this by isolating the LED state from data lines.
- Photonic side-channel analysis. Specialized labs use single-photon detectors to image the very faint light emitted by transistors switching in a running chip. The pattern of light reveals what computations are happening. Cutting-edge attack technique, currently confined to nation-state-level adversaries.