Wall power swings positive and negative sixty times a second, but your phone wants steady DC. Four diodes in a bridge do something clever: whichever way the input leans, they route it out the same terminal — every negative hump gets folded up into a positive one. Slide the smoothing and watch AC become DC.
A diode conducts only one way, so a bridge of four steers current from whichever input terminal is higher to the same output terminal: the raw output is |Vᵢₙ|, every negative half-cycle folded positive (twice the ripple frequency of a single diode). A smoothing capacitor then holds the peaks between humps, and more capacitance = flatter DC. A fail-loud self-check throws unless the rectified output is ≥ 0 at every phase and equals |Vᵢₙ| exactly — the fold that makes DC out of AC.
Ideal diodes (no ~0.7 V forward drop, no reverse leakage) and an RC-only smoothing model — a real supply loses two diode-drops and needs a regulator for clean DC. The full-wave fold (out = |Vᵢₙ|) and its ≥ 0 guarantee are exact.