Email   Home Page

Digital to Analog Conversion Basics

Digital to analog conversion is required for any audio files that are stored or processed digitally. The digital version stores the bits of information as various values. These values are read and an analog voltage is produced. The streaming of the converted data is what you hear.

I know that you have heard the term 'sampling' before. Now I'm not talking about sampling as in recording a short piece of audio digitally but the type of sampling involved in the recording and playback of data. Now I know the former may involve the latter but I'm talking about a sample which is a single piece of information (data).

Recorded data:
CDs are recorded with 16 bit samples. This means that every sample has 216 or 65,536 possible divisions or points that the peak-peak output voltage can be broken up into. Let's say that the maximum output voltage of a hypothetical piece of audio equipment was 5 volts. If we only had a 3 bit recording, we would only be able to have 8 (2^3) different output levels. They would be plus and minus: 0v, 1.67v, 3.33v and 5 volts. In other words, if the signal was played through a speaker, the cone of the speaker would only be able to move to 4 different positions in each direction from its point of rest. This would provide a low resolution output signal and would NOT sound very good. A higher resolution will produce better sound quality.

Sampling Rate:
The sampling rate is the number of samples of data taken in one second for each channel of audio being recorded. CDs are recorded at 44,100 samples per second.

The image below is a 1000hz signal recorded at 8000 samples per second. The bright green dots are the points where the data was taken. you can count them and see that there 8 samples per cycle. Multiply that by 1000 cycles per second and you get the 8000 samples/sec. The rate at which it was recorded. This is 0.0045 seconds of audio.

Sampled at 8000/sec

The image below is a 1000hz signal recorded at 44,100 samples per second. The bright green dots are the points where the data was taken. You can't count these very easily. This is also 0.0045 seconds of audio. You can easily see that there is much more data in this recording.

Sampled at 44,100/sec

Digital to analog:
The data recorded onto the CD is digital. We cannot decode the digital signal in our heads so it has to be decoded in the audio equipment before it gets to the speakers. This is usually done in the CD player in the D/A converter. This converter takes the digital signal and converts it to an analog signal. This signal is then sent through a low pass filter to smooth out the actual analog waveform. IF it didn't pass through the filter, the analog signal would look like a staircase instead of being nice and curvy and round and smooth (like we like it). The image below shows the converted digital (cyan) and analog (violet) signals together. The digital signal is after the D/A converter and before the low pass filter. The violet line is what the cyan signal would look like after passing through the LPF.

Digital and analog signals

Oversampling is the mathematical interpolation of data. It allows a signal with x number of samples/s to be increased to any multiple of x. A 44k rate signal with 2 times oversampling will have 88,000 data points from which to decode the recorded audio. All current models of CD players currently use oversampling. Some use oversampling rates of 8 times or higher. The image below shows the difference between a decoded digital signal and the same signal with 2x oversampling.

 2x oversampling

Sampling vs Frequency Response:
The sampling frequency must be at least twice as high as the highest frequency that you wish to reproduce because you must have at least 1 data point for each half cycle of the audio waveform. The highest frequency that you can record with a sampling rate of 8k is 4000hz. At a sampling rate of 44k, you can record up to 22khz but the filters used in the D/A conversion process have a very high rate slope at 20,000hz which will allow nothing higher than 20khz to get through. The newer D/A converters with high rates of oversampling are able to use low pass filters with a slower roll off.

You May Be Interested in My Other Sites


Click HERE to visit a friend's new car audio tech site.