High fidelity: how the sound of CDs stays error-free

That’s Maths: Error-correcting codes were first developed more than 50 years ago. But how do they protect CD recordings?

Music is encoded on a CD in digital form as a stream of binary digits or bits. A typical CD may have as many as a million errors. Photograph: Thinkstock

Music is encoded on a CD in digital form as a stream of binary digits or bits. A typical CD may have as many as a million errors. Photograph: Thinkstock

 

The quality of music recordings on compact discs is excellent. In the age of vinyl records, irritating clicks resulting from surface scratches were almost impossible to avoid. Modern recording media are largely free from this shortcoming.

But this is curious. CD music can be contaminated for many reasons: dirt on the disc surface, flaws in the plastic substrate, errors in burning on the recording, scratches and fingerprints, and so on.

Music is encoded on a CD in digital form as a stream of binary digits or bits. There are more than four million bits per second, so if one bit in 10,000 is in error (an error rate of 0.1 per cent) there will still be hundreds of errors every second. How then can we explain the high fidelity of the recordings? The answer lies in error-correcting codes.

The incoming audio signal is sampled 44,100 times per second. This allows us to hear frequencies up to 20,000 cycles per second, adequate for most purposes. Each sample is expressed in digital form as a string of 16 bits or two bytes (one byte is eight bits). The signal is broken into segments of 24 bytes. Then check bits are added to make it 32 bytes. These check bits are cleverly arranged so that it is possible not only to detect errors but to correct them.

 

Information rate

The error-correction system used for CDs is called the Cross-interleaved Reed-Solomon Code (Circ). The information rate is three out of four; that is, 75 per cent of the bits contain information and 25 per cent enable error detection and correction. This overhead is worthwhile, making all the difference between wonderful quality and intolerable contamination.

A typical CD may have as many as a million errors. Code correction is applied in two stages, extending each 24-bit string first to 28 bits, and then, using a complementary method, to 32 bits. The resulting “product code” is very effective. Errors tend to occur in local bursts; for example, a scratch may damage several adjacent tracks of the recording.

To counteract this, the bit strings are fragmented and distributed to different areas of the disc. Before we hear the recording, this interleaving is reversed, the errors are corrected and the digital stream is converted to an analogue audio signal. Then, thanks to a combination of technology and mathematics, we can relax and enjoy music free from distortion or surface noise.

 

Redundant information

Error-correcting codes have been around for more than 50 years. They were introduced by Richard Hamming at Bell Labs. He was so disturbed by the high level of errors in the old electromechanical computing machinery, he devised a method of adding redundant information so the exact position of any bit that was in error could be located and corrected.

Coding theory has blossomed in the digital age and is an active field of mathematical research today. We depend on reliable communication channels that transmit large volumes of data. This data must be compressed before sending, and accurately expanded on arrival. If it is sensitive, it must be encrypted, and inevitable errors in noisy transmission channels must be detected and corrected. Hamming’s wrestling match with punched-card equipment has led to a worldwide industry.

  • Peter Lynch is emeritus professor at the school of mathematics and statistics at University College Dublin. He blogs at thatsmaths.com
The Irish Times Logo
Commenting on The Irish Times has changed. To comment you must now be an Irish Times subscriber.
SUBSCRIBE
GO BACK
Error Image
The account details entered are not currently associated with an Irish Times subscription. Please subscribe to sign in to comment.
Comment Sign In

Forgot password?
The Irish Times Logo
Thank you
You should receive instructions for resetting your password. When you have reset your password, you can Sign In.
The Irish Times Logo
Please choose a screen name. This name will appear beside any comments you post. Your screen name should follow the standards set out in our community standards.
Screen Name Selection

Hello

Please choose a screen name. This name will appear beside any comments you post. Your screen name should follow the standards set out in our community standards.

The Irish Times Logo
Commenting on The Irish Times has changed. To comment you must now be an Irish Times subscriber.
SUBSCRIBE
Forgot Password
Please enter your email address so we can send you a link to reset your password.

Sign In

Your Comments
We reserve the right to remove any content at any time from this Community, including without limitation if it violates the Community Standards. We ask that you report content that you in good faith believe violates the above rules by clicking the Flag link next to the offending comment or by filling out this form. New comments are only accepted for 3 days from the date of publication.