This shows a 120V line feeding into 1 line in order to create DC power, although with an analog signal.
This circuit demonstrates why digital is preferable to analog. Notice the top LED pulses while the lower LED emits a constant (sorta) stream of light.
Added an Opamp which converts Analog current to digital current
Alternating current fed in, diodes direct the flow, opamp converts the current from analog to digital, diodes further redirect current into a (mostly) steady digital stream.