AQA 7517, section 4.5.6.3
A computer can only process digital data, but the world is analogue. Two converters link them.
- An analogue to digital converter (ADC) turns an analogue signal into digital data.
- A digital to analogue converter (DAC) turns digital data into an analogue signal.
Analogue to digital converter (ADC)
An ADC measures an analogue signal and outputs it as binary numbers.
Principle of operation
- Sample. At regular intervals, the voltage of the analogue signal is measured. The number of samples per second is the sampling rate.
- Quantise. Each measured voltage is rounded to the nearest of a fixed set of levels. The number of levels depends on the number of bits, so 8 bits gives 256 levels. This is the sample resolution.
- Encode. Each level is output as a binary number.
Example: a 3-bit ADC measures voltages from 0 V to 7 V and gives whole levels 0 to 7.
| Time | Voltage | Rounded level | Binary output |
|---|---|---|---|
| 1 | 2.2 V | 2 | 010 |
| 2 | 4.8 V | 5 | 101 |
| 3 | 6.6 V | 7 | 111 |
The rounding means the digital values only approximate the original signal. More bits give more levels and a closer match. A higher sampling rate captures the signal's changes more faithfully.
Where ADCs are used
ADCs are used with analogue sensors, which produce an analogue voltage that the computer can't read directly:
- a microphone, which senses sound pressure;
- a temperature sensor;
- a light sensor;
- a pressure sensor in a weather station or in a car.
Digital to analogue converter (DAC)
A DAC works in the opposite direction. It takes a stream of binary numbers and produces an analogue voltage that matches them.
Principle of operation
- Each binary number is turned into a voltage level that corresponds to its value.
- The voltage is held until the next number arrives, so the output is a series of steps.
- The steps are smoothed, to give a continuous analogue wave.
Where DACs are used
The most common use is to convert a digital audio signal to an analogue signal, so you can hear it. The analogue output drives headphones or speakers, which need a varying voltage to make the sound wave. Every phone, MP3 player and computer has a DAC for its audio output. They are also used for motor control and for screens.
Comparing the two
| ADC | DAC | |
|---|---|---|
| Input | Analogue signal | Digital data |
| Output | Digital data | Analogue signal |
| Direction | Real world to computer | Computer to real world |
| Used with | Sensors, microphones | Speakers, headphones |
| Key steps | Sample, quantise, encode | Convert to voltage, hold, smooth |
Worked example
Task: describe how a voice is recorded by a computer, and then played back.
- The voice produces a sound wave (analogue).
- A microphone converts it to an analogue electrical signal.
- An ADC samples the voltage thousands of times a second and converts each sample to binary, which is stored in a file.
- For playback, the computer reads the binary numbers and sends them to a DAC.
- The DAC produces an analogue voltage that follows the sample values.
- A speaker turns it back into sound waves.
Exam tip: name the input and output of each converter and give its job in the system. ADCs go with sensors (such as microphones), and the most common use of a DAC is to turn digital audio into an analogue signal for speakers.
Check yourself
What does an ADC do?
It converts an analogue signal into digital data, by sampling it and encoding each sample as a binary number.
What is the most common use of a DAC?
Converting a digital audio signal into an analogue signal for headphones or speakers.
Why are ADCs needed with analogue sensors?
A computer can only process digital data, but sensors produce an analogue voltage, so it must be converted to binary first.
Why is the digital value from an ADC only an approximation?
Each measurement is rounded to the nearest of a limited number of levels, and the signal is only measured at intervals.