You press the red button on your phone's voice recorder and say your name. A few seconds later you press play, and your own voice comes out of the speaker. Nothing magical happened in between, but a great deal of arithmetic did. The microphone doesn't produce numbers. It produces a voltage that wobbles up and down just the way the air wobbles when you speak. The processor inside the phone can't do anything with a wobbling voltage, because it understands only 0 and 1.
So something has to measure that voltage thousands of times a second and write down each measurement as a binary number. Playing the recording back needs the opposite trick: a stream of numbers has to become a voltage again, or the speaker stays silent.
The first circuit is called an analog-to-digital converter, an ADC. The second is a digital-to-analog converter, a DAC. The same pair sits inside a digital multimeter, a prepaid electricity meter, a hospital thermometer and the Arduino on a student's desk. A third, humbler circuit hides inside almost every ADC: the comparator, which does nothing but answer "which of these two voltages is bigger?".
By the end of this chapter you will be able to work out what a DAC outputs for any input code, and which code gives any output you want. You'll pick the right step-size rule from the wording of a question, and say how many bits a job needs. You'll explain sampling, quantisation and encoding, and find the code an ADC gives for a voltage. And you'll draw and trace the counter-type, successive-approximation, flash and dual-slope ADCs.