For an answer to this question, you have to understand how these integrated circuits operate at their core. Their secret lies in voltage comparators. They are the basis of all analog-to-digital converter.
On the following pages you get to know comparators. To do this you use a widely used integrated circuit, the LM311. Have you understood the basic operation of comparators, you can quickly build more complex circuits.
To get started you need to do a few preparations.