Sound is produced by air pressure variations, which are transformed in electric intensity variations through a microphone. This analog electric signal is then converted into a digital signal binary encoded with an AD converter (analog to digital), when being recorded on a CD, hard drive, or any digital device.
When being played, with a CD player for example, the digital signal is being reconverted back to analog with a DA converter (digital to analog), then into air pressure variations out of the loudspeakers so to restitute, ideally, a sound as close to the original as can be.
Analog signal conversion
How does the AD conversion work? « Photographies » of the signal are being taken, in order to note down its modulation amplitude at regular intervals. So that from a continuous signal, you get a discontinuous signal.
Analog signal sampling
[singlepic id=1 w=320 h=240 float=center]
This is what is called the signal sampling.It is obvious that the higher the sampling frequency is (the more photographies of the signal you take), the more accurate the reconstitution is going to be.
To each amplitude noted down is then associated a binary value : this is the quantification of the signal.
Quantification of a digital signal
[singlepic id=3 w=320 h=240 float=center]
The bigger the amount of encoding bits, the smaller the quantification error, and the closer the digital signal to the orignal analog one.
The human ear can hear sounds between 20 Hz and 20 kHz. Digital signal theory says through Nyquist-Shannon theorem that in order to restitute a signal faithfull to the original, the sampling frequency has to be at least twice higher than the highest one recorded (explaining it in details is not for this article). For an audio signal, the sample frequency has thus to be at least 40 kHZ.
The CD standard quality is a digital signal encoded with 16 bits at a 44,1 kHz sampling frequency. Which means that photographies of the signal are being taken 44100 times per second, and that to each amplitude photographed is associated a value between 0 and 216 , that is 65536 possible amplitude values.
As an analogy, in the movie industry, the sampling frequency is of 24 images per second: each second of image is in fact made of 24 « photographies », which appear to us as a continuous motion, since our retinal persistance reaches there its limits. We could sample at a higher frequency, but we would then overcome by far our visual analysis abilities.