diode
/ DY-ohd /
Think of a turnstile that only lets people walk one way: push from the right and you sail through, push from the left and it locks. A diode is the electrical version of that one-way gate — it lets current flow freely in one direction and almost completely blocks it in the other.
Most diodes are simply a single p-n junction with a terminal at each end. Connect the voltage so it pushes electrons and holes toward the junction — called forward bias — and they pour across and recombine, so current flows easily. Reverse the voltage and it pulls carriers away from the junction, widening the depletion region into a barrier, so only a vanishingly small current leaks through. This lopsided, one-way behavior is the diode's whole purpose.
Diodes are everywhere: they turn the back-and-forth alternating current from a wall socket into the steady one-way current electronics need, protect circuits from reversed batteries, and form the basis of light-emitting diodes and solar cells. One honest caveat: a real diode is not a perfect switch. It needs a small forward voltage — about 0.7 volts in silicon — before it conducts well, and it can be forced to break down and conduct backward if the reverse voltage gets too high.
A phone charger uses diodes to rectify the wall's alternating current: four diodes arranged in a bridge flip the negative half of each wave to positive, producing a bumpy one-way current that smoothing capacitors then turn into steady DC.
Rectification: diodes convert household AC into the one-way current electronics run on.
Not all diodes are made from p-n junctions. Some, like Schottky diodes, use a metal-semiconductor contact instead, switching faster but with their own quirks — the one-way idea is general, but the implementation varies.