There are two types of computers: digital computers and analogue computers. Most people use digital computers; in fact analogue computers are quite rare. Analogue computers are used mainly for the control of processes in factories and for some forms of modelling. Digital computers like to be given their information in the form of numbers (i.e. in the form of binary digits). All information eventually has to be turned into groups of binary digits (0s and 1s).

However, data can either be analogue or digital. There is a basic problem with a great deal of the data we ask computers to handle, and it stems from a simple fact: the world we live in is analogue - not digital. Therefore we have to be able to convert analogue data into digital data.

Digital quantities have values which jump from one to the next without any 'in-between' value. For example, an on/off light switch on a is a device that could be thought of as digital because there is no state between 'on' and 'off '. However a dimmer light switch can be thought of as analogue as you turn the switch in order to dim the light.
What is the temperature?

Some quantities can vary over a whole range of values. One example is the mercury thermometer. When measuring temperature we watch the expansion of mercury up a glass tube. The mercury expansion is an analogue event, but the Celsius measurements are not. In the image, the mercury reads between 21°C and 22°C. Temperature is an example, since it can be 21°C 21.4°C, 21.43°C, 21.435°C and so on. In fact, temperatures can be an infinite number of values. Quantities which have an infinite number of values are called analogue quantities.

As everything a computer deals with must ultimately be reduced to zeros and ones, for analogue quantities to be processed by a digital computer these need first to be converted into digital quantities using an analogue to digital converter. A sundial or even a clock hand represent time in an analogue way, and we measure time by the rotation. Speed, sound, mass, gravity, acceleration, voltage, current and so on are all examples of data that is analogue that needs to be converted to digital data.

Analogue sound needs to be converted to digital data
Images, sound and video are three types of data that need to be converted into digital format.

Sound sampling

If you have a multimedia computer system with a microphone, then you can play a recording or a live sound into the sound card of your computer. The sound card listens to the sound and takes a measurement of the height of the signal many times a second. The measurement is called the sound sample.

Sound is an analogue waveform and for a computer to be able to process, store and play it back, it has to be turned into a digital signal.