Data Encoding on a CD

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


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

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

legal disclaimer

1) Our website 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 infringements, please read the Terms of service and contact us to investigate the problem.
2) The E-articles directory team is not responsible for inaccuracies, falsehoods, or any other types of misinformation this tutorial 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. Please read the Terms of service

Useful tools and features

Translate this article to...    Send this article to you or to a friend

Link to this article from your page   
If you like this article (tutorial), please link to it from your web page using the information above. Linking to this page, this is the only way to help us improve our service, the same time providing your visitors with a way to improve their online experience.

related articles

1. High Capacity Magnetic Storage Devices
High-capacity removable media drives are an ever-shrinking category. With competition at the low end (1GB and under capacities) from USB flash memory keychain drives and at higher capacities from external mini-hard disks (4GB and up), rewritable DVD (8.5GB), and larger USB and FireWire hard disks (20GB and up), there are only two current product families, both from Iomega: Zip. Flexible media, with capacities of 100MB, 250MB, and 750MB REV. Rigid media, with capacity of 35GB (native...

2. Handling CD Read Errors
Handling errors when reading a disc was a big part of the original Red Book CD standard. CDs use parity and interleaving techniques called cross-interleave Reed-Solomon code (CIRC) to minimize the effects of errors on the disk. This works at the frame level. When being stored, the 24 data bytes in each frame are first run through a Reed-Solomon encoder to produce a 4-byte parity code called "Q" parity, which then is added to the 24 data bytes. The resulting 28 bytes are then run though another encoder that uses a different scheme...

3. Floppy Drive Types
As distinct from diskette types and formats, six drive types have been installed in PC-compatible systems: 5.25-inch 160/180 KB (SSDD) Single-Sided, Double-Density(SSDD) was the standard FDD in very early PC-class systems. These drives read and write only SSDD diskettes. 5.25-inch 320/360 KB (DSDD) Double-Sided, Double-Density(DSDD) was the standard FDD in PC-class systems, and was often found as a second FDD in early AT and 386 systems. The...

4. How to choose a Tape Backup Drive
Choosing a tape backup drive can be a simple job if you need to back up a single standalone system with a relatively small hard drive. The decision becomes more complex if the system has a larger hard drive or if you must back up a desktop system as well as a laptop. Choosing a tape backup drive type can be an even more complex program if you must back up a network server's hard drives and perhaps even back up the workstations from the server. As you ponder which backup tape drive you should select, consider the following facto...

5. DVD Copy Protection
DVD video discs employ several levels of protection that are mainly controlled by the DVD Copy Control Association (DVD CCA) and a third-party company called Macrovision. This protection typically applies only to DVD-Video discs, not DVD-ROM software. So, for example, copy protection might affect your ability to make backup copies of The Matrix, but it won't affect a DVD encyclopedia or other software application distributed on DVD-ROM discs. Note that every one of these protection systems has been broken, so with a lit...

6. How to Manually Resolve Motherboard Conflicts
In the past, the only way to resolve conflicts manually was to take the cover off your system and start changing switches or jumper settings on the adapter cards. Fortunately, this is a bit easier with plug-and-play because all the configuration is done via the Device Manager software included in the operating system. Although some early plug-and-play cards also had jumper switches or setup options to enable them to be configured manually, this feature was found primarily on ISA PnP-compatible cards. Be sure you write down or print o...

7. Hard Drive Advancements
In 1957, Cyril Northcote Parkinson published his famous compilation of essays titled Parkinson's Law, which begins with the statement, "Work expands so as to fill the time available for its completion." A corollary of Parkinson's most famous "law" can be applied to hard drives: "Data expands so as to fill the space available for its storage." This, of course, means that no matter how big a drive you get, you will find a way to fill it. I know that I have lived by that dictum since purchasing my first hard disk drive more than 2...

8. How Magnetic Fields Are Used to Store Data
All magnetic storage devices read and write data by using electromagnetism. This basic principle of physics states that as an electric current flows through a conductor (wire), a magnetic field is generated around the conductor. Note that electrons actually flow from negative to positive as shown in the figure, although we normally think of current flowing in the other direction Electromagnetism was discovered in 1819 by Danish physicist Hans Christian Oersted, when he found that a compass needle would deflect away from p...

9. Hard Disk Form Factors
The cornerstone of the PC industry has always been standardization. With disk drives, this is evident in the physical and electrical form factors that comprise modern drives. By using industry-standard form factors, you can purchase a system or chassis from one manufacturer and yet physically and electrically install a drive from a different manufacturer. Form factor standards ensure that available drives will fit in the bay, the screw holes will line up, and the standard cables and connections will plug in. Without these indus...

10. Magneto Optical Drives
One of the most neglected types of removable-drive technologies is the magneto-optical (MO) drive. Introduced commercially in 1985, magneto-optical drives are now available in capacities exceeding 9GB. Two sizes of magneto-optical media and drives are available for desktop computers: 3 1/2" and 5 1/4". The 3 1/2" drives have capacities up to 2.3GB, and the 5 1/4" drives have capacities up to 9.1GB. 12" MO drives are also available for enterprise systems. Originally, magneto-optical drives were strictly WORM (write once, r...