Compact Disc - The Inside Story

Part 3 - Data Format

[Contents] [Previous Part] [Next Part]

Data is recorded on the disc as the presence or absence of "bumps" along the continuous spiral track. This binary information is serially read from the disc in groups of 17 bits. Run-Length-Limited encoding requires that the binary state transitions can only occur every 3 to 11 bits. This lowers the maximum recorded frequency and eases the tolerances required for the playback hardware.

Some numbers: The basic bit rate is 4.3218 MHz or 231.4 ns. The highest recorded frequency, with a minimum period of 6 bits, or a transition every 3 bits, equates to about 720 KHz. Likewise, the lowest frequency is about 196 KHz.

Of the 17 bits, 14 contain meaningful data. Given the transition period constraint, there are only 267 binary data patterns of the possible 16384 that are usable. 256 of these have been chosen to correspond to each combination of an 8 bit byte. This is where the term EFM (Eight-to- Fourteen-Modulation) comes from.

To simplify the design of the data separator, the average DC content of the signal is kept to zero. Behold the purpose of the remaining 3 bits. This period may or may not contain a transition, to restore the DC balance of the recorded signal up to that time.

So, every 17 bits recorded generates and 8 bit byte of decoded data. This is a data bit rate of 4.3218 x 8 / 17 = 2034 KHz. Not bad, considering the range of actual recorded frequencies stated earlier!

The 17 bit symbols are grouped in blocks of 33. To enable the player to synchronise and read the symbols, each block is preceeded by 3 transitions separated by 2 periods of 11 bits. This unique header pattern cannot appear as data within a block. This makes a total block length of 588 bits, lasting 136 us, or 7350 per second, and uses about 0.2 mm of a track.

In each block, the 33 data bytes of 8 bits each are broken up as 1 sub- code, 12 odd-audio, 4 Q-redundancy, 12 even-audio and 4 P-redundancy. As a quick check, there are 2 x 12 x 8 = 192 audio bits in each block, or 6 stereo samples of 16 bits. Multiply 6 by the block rate of 7350 and you get 44100. The magic sample rate! You should now all be able to go away and start decoding the data bytes of your favourite CD under any handy electron microscope.

The real-time audio samples are not stored in blocks in the order they occur. All the sample bytes are convoluted in a complicated interleave algorithm that takes 6 stereo samples of 24 bytes and spreads them over 109 blocks. This is a period of about 15 ms, or about 18 mm of track.

The interleave algorithm also generates two types of redundancy information, called P and Q. They are used to detect and correct both random bit errors in data bytes and burst errors of hundreds of successive bits.

When recording the CD master, the 24 data bytes that make up the 6 stereo samples are fed in parallel to the algorithm at the block rate. The 12 bytes of the even samples are first delayed for processing by 2 blocks. The "C2 encoder" then produces 4 extra bytes of Q-redundancy, making a total of 28 bytes. The 28 bytes are then each given unequal delays, ranging from 0 to 108 blocks, in multiples of 4. The "C1 encoder" then produces 4 extra bytes of P-redundancy from the 28 bytes. Because of the unequal delay before the "C1 encoder", the 28 bytes used are actually from 28 different "C2 encoder" generated byte sets.

There is now a total of 32 bytes; the next step merely delays alternate bytes by one block. The final step inverts the 8 P and Q redundancy bytes, so that these will be non-zero when the audio samples are zero. The resulting 32 bytes, plus 1 sub-code byte, neatly fit into the 33 byte block.

If you have understood what I have said so far, congratulations. The astute readers will notice I have made a couple of unexplained references to sub-code. This fascinating subject is the topic of the next part.

[Contents] [Previous Part] [Next Part]

Originally published in MAC Audio News No. 159, March 1988, pp 16-17.

Copyright © 1988 Glenn Baddeley. cd3.html was last updated 2 December 1996.