C++ program that uses successive approximation to turn an input voltage into a binary value, based on a reference voltage.