An 8 bit digital to analog converter using an R-2R resistor ladder.
There are 8 input channels giving 256 distinct output voltages (the nth input channel contributes 2^n to the output).
For example, turning on every other switch gives an output voltage of 3.32V because 10101010_2 = 170_10 and 5V * 170 / 256 = 3.32V. By turning the top-most switch off the voltage drops down to 820mV (00101010_2 = 42_10, and 5V * 42 / 256 = 820mV).