Blue: analog waveform
Green: sampled waveform
Orange: filtered output
An analog-to-digital-to-analog converter, with zero real world use (but it's fun to look at). This one uses a flash ADC followed by an R-R2 ladder with the sampled wave filtered with an RC circuit as the output.
I've also published a 3-bit version.