Data Encoding on a CD

written by: Terry McLean; article published: year 2007, month 01;


In: Root » Computers and technology » Storage devices » Data Encoding on a CD

Dutch French Spanish Portuguese Italian German Japanese Chinese Korean Russian Arabic Bookmark and Share this Article

The final part of how data is actually written to the CD is very interesting. After all 98 frames are composed for a sector (whether audio or data), the information is then run through a final encoding process called EFM (eight to fourteen modulation). This scheme takes each byte (8 bits) and converts it into a 14-bit value for storage. The 14-bit conversion codes are designed so that there are never fewer than 2 or more than 10 adjacent 0 bits. This is a form of Run Length Limited (RLL) encoding called RLL 2,10 (RLL x, y where x = the minimum and y = the maximum run of 0s). This is designed to prevent long strings of 0s, which could more easily be misread, as well as to limit the minimum and maximum frequency of transitions actually placed on the recording media. With as few as 2 or as many as 10 0 bits separating 1 bits in the recording, the minimum distance between 1s is 3 bit time intervals (usually referred to as 3T) and the maximum spacing between 1s is 11 time intervals (11T).

Because some of the EFM codes start and end with a 1 or more than five 0s, three additional bits called merge bits are added between each 14-bit EFM value written to the disc. The merge bits usually are 0s but might contain a 1 if necessary to break a long string of adjacent 0s formed by the adjacent 14-bit EFM values. In addition to the now 17-bits created for each byte (EFM plus merge bits), a 24-bit sync word (plus 3 more merge bits) is added to the beginning of each frame. This results in a total of 588 bits (73.5 bytes) actually being stored on the disc for each frame. Multiply this for 98 frames per sector and you have 7,203 bytes actually being stored on the disc to represent each sector. A 74-minute disc, therefore, really has something like 2.4GB of actual data being written, which after being fully decoded and stripped of error correcting codes and other information, results in about 682MB (650MiB) of actual user data.

The calculations for EFM-encoded frames and sectors are shown below

EFM-Encoded Data Calculations
EFM-Encoded Frames: 74-Minute 80-Minute
---------------------------------------------------------------------------------------
Sync word bits 24 24
Subcode bits 14 14
Data bits 336 336
Q+P parity bits 112 112
Merge bits 102 102
---------------------------------------------------------------------------------------
EFM bits per frame 588 588
EFM-Encoded Sectors:
---------------------------------------------------------------------------------------
EFM bits per sector 57,624 57,624
EFM bytes per sector 7,203 7,203
---------------------------------------------------------------------------------------
Total EFM data on disc (MB) 2,399 2,593
B = Byte (8 bits)
KB = Kilobyte (1,000 bytes)
KiB = Kibibyte (1,024 bytes)
MB = Megabyte (1,000,000 bytes)
MiB = Mebibyte (1,048,576 bytes)
EFM = Eight to fourteen modulation


To put this into perspective, see the table below for an example of how familiar data would actually be encoded when written to a CD. As an example, I'll use the letters "N" and "O" as they would be written on the disk.

EFM Data Encoding on a CD
Character "N" "O"
------------------------------------------------------------------------------------
ASCII decimal code 78 79
ASCII hexadecimal code 4E 4F
ASCII binary code 01001110 01001111
EFM code 00010001000100 00100001000100
ASCII = American Standard Code for Information Interchange
EFM = Eight to fourteen modulation

Disclaimer

1) E-articles is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringement, please read the terms of service and contact us to investigate the problem.
2) E-articles is not responsible for inaccuracies, falsehoods, or any other types of misinformation this article may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here.

link to this article