Hard Drives 101: Magnetic Storage

Data-Encoding Schemes And Frequency Modulation Encoding

Data Encoding Schemes

Magnetic storage is essentially an analog medium. The data a PC stores on it, however, is digital information—that is, 1s and 0s. When the drive sends digital information to a magnetic recording head, the head creates magnetic domains on the storage medium with specific polarities corresponding to the positive and negative voltages the drive applies to the head. The flux reversals form the boundaries between the areas of positive and negative polarity that the drive controller uses to encode the digital data onto the analog medium. During a read operation, each flux reversal the drive detects generates a positive or negative pulse that the device uses to reconstruct the original binary data.

To optimize the placement of flux transitions during magnetic storage, the drive passes the raw digital input data through a device called an encoder/decoder (endec), which converts the raw binary information to a waveform designed to optimally place the flux transitions (pulses) on the media. During a read operation, the endec reverses the process and decodes the pulse train back into the original binary data. Over the years, several schemes for encoding data in this manner have been developed; some are better or more efficient than others, which you see later in this section.

Other descriptions of the data-encoding process might be much simpler, but they omit the facts that make some of the issues related to hard drive reliability so critical—namely, timing. Engineers and designers are constantly pushing the envelope to stuff more and more bits of information into the limited quantity of magnetic flux reversals per inch. What they’ve come up with, essentially, is a design in which the bits of information are decoded not only from the presence or absence of flux reversals, but from the timing between them. The more accurately they can time the reversals, the more information that can be encoded (and subsequently decoded) from that timing information.

In any form of binary signaling, the use of timing is significant. When a read or write waveform is interpreted, the timing of each voltage transition event is critical. Timing is what defines a particular bit or transition cell—that is, the time window within which the drive is either writing or reading a transition. If the timing is off, a given voltage transition might be recognized at the wrong time as being in a different cell, which would throw the conversion or encoding off, resulting in bits being missed, added, or misinterpreted. To ensure that the timing is precise, the transmitting and receiving devices must be in perfect synchronization. For example, if recording a 0 is done by placing no transition on the disk for a given time period or cell, imagine recording ten 0 bits in a row—you would have a long period of time (ten cells) with no activity, no transitions at all.

Imagine now that the clock on the encoder was slightly off time while reading data as compared to when it was originally written. If it were fast, the encoder might think that during this long stretch of 10 cells with no transitions, only nine cells had actually elapsed. Or if it were slow, it might think that 11 cells had elapsed instead. In either case, this would result in a read error, meaning the bits that were originally written would not be read as being the same. To prevent timing errors in drive encoding/decoding, perfect synchronization is necessary between the reading and writing processes. This synchronization often is accomplished by adding a separate timing signal, called a clock signal, to the transmission between the two devices. The clock and data signals also can be combined and transmitted as a single signal. Most magnetic data-encoding schemes use this type of combination of clock and data signals.

Adding a clock signal to the data ensures that the communicating devices can accurately interpret the individual bit cells. Each bit cell is bounded by two other cells containing the clock transitions. Because clock information is sent along with the data, the clocks remain in sync, even if the medium contains a long string of identical 0 bits. Unfortunately, the transition cells used solely for timing take up space on the medium that could otherwise be used for data.

Because the number of flux transitions a drive can record in a given space on a particular medium is limited by the physical nature or density of the medium and the head technology, drive engineers have developed various ways of encoding the data by using a minimum number of flux reversals (taking into consideration the fact that some flux reversals used solely for clocking are required). Signal encoding enables the system to make the maximum use of a given drive hardware technology.

Although various encoding schemes have been tried, only a few are popular today. Over the years, these three basic types have been the most popular:

  • Frequency Modulation
  • Modified Frequency Modulation
  • Run Length Limited


The following sections examine these codes, how they work, where they are used, and any advantages or disadvantages that apply to them. It will help to refer to the image on page six of this piece as you read the descriptions of these encoding schemes because this figure depicts how each of them would store an “X” on the same media.

Frequency Modulation Encoding

One of the earliest techniques for encoding data for magnetic storage is called Frequency Modulation encoding. This encoding scheme—sometimes called Single-Density encoding—was used in the earliest floppy disk drives installed in PC systems. The original Osborne portable computer, for example, used these single-density floppy disk drives, which stored about 80 KB of data on a single disk. Although it was popular until the late 1970s, FM encoding is no longer used.

Modified FM Encoding

Modified Frequency Modulation encoding was devised to reduce the number of flux reversals used in the original FM encoding scheme and, thus, to pack more data onto the disk. MFM encoding minimizes the use of clock transitions, leaving more room for the data. It records clock transitions only when a stored 0 bit is preceded by another 0 bit; in all other cases, a clock transition is not required. Because MFM minimizes the use of clock transitions, it can double the clock frequency used by FM encoding, which enables it to store twice as many data bits in the same number of flux transitions.

Because MFM encoding writes twice as many data bits by using the same number of flux reversals as FM, the clock speed of the data is doubled and the drive actually sees the same number of total flux reversals as with FM. This means a drive using MFM encoding reads and writes data at twice the speed of FM, even though the drive sees the flux reversals arriving at the same frequency as in FM.

Because it is twice as efficient as FM encoding, MFM encoding also has been called double-density recording. MFM is used in virtually all PC floppy disk drives today and was used in nearly all PC hard disks for a number of years. Today, virtually all hard disks use variations of RLL encoding, which provides even greater efficiency than MFM.

The table below shows the data bit-to-flux reversal translation in MFM encoding.

MFM Data-to-Flux Transition Encoding
Data Bit Value
Flux Encoding
1
NT
0 preceded by 0
TN
0 preceded by 1
NN
T = Flux transition, N = No flux transition
Create a new thread in the US Reviews comments forum about this subject
This thread is closed for comments
29 comments
Comment from the forums
    Your comment
  • SteelCity1981
    Wow very, very interesting article to say the least.
  • soccerdocks
    "Density initially grew at a rate of about 25% per year (doubling every four years)"

    If density grows at 25% per year it would actually double in just barely over 3 years. At 4 years it would be 144% greater.
  • joytech22
    Quote:
    when passed over magnetic flux transitions.

    I somehow expected "Flux capacitors" instead.
  • johnners2981
    soccerdocks"Density initially grew at a rate of about 25% per year (doubling every four years)"If density grows at 25% per year it would actually double in just barely over 3 years. At 4 years it would be 144% greater.


    No you're wrong, how embarrassing :). You're using compound interest. Quit trying to be a smartass
  • Device Unknown
    johnners2981No you're wrong, how embarrassing . You're using compound interest. Quit trying to be a smartass


    I'm no math guy, in fact i suck at it, but I see his point, why wouldn't it be compound? and even at compound interest is 144 still accurate? please enplane
  • soo-nah-mee
    I believe soccerdocks is right - example...
    Beginning value: 10
    After one year: 12.5
    After two years: 15.625
    After three years: 19.531 (Almost double)
    After four years: 24.41
  • johnners2981
    Device UnknownI'm no math guy, in fact i suck at it, but I see his point, why wouldn't it be compound? and even at compound interest is 144 still accurate? please enplane


    Please enplane??? Compound interest is used to calculate interest and not things like density.
    They were right in saying "doubling every four years" and he was trying to correct them when there was no need so showed him who's boss, oh yeah
  • johnners2981
    soo-nah-meeI believe soccerdocks is right - example...Beginning value: 10After one year: 12.5After two years: 15.625After three years: 19.531 (Almost double)After four years: 24.41


    His calculation is right not the application, why is he using compound interest to calculate the percentage increase in density? It doesn't make sense.
  • soo-nah-mee
    johnners2981His calculation is right not the application, why is he using compound interest to calculate the percentage increase in density? It doesn't make sense.
    It's not compound "interest", but it is compounding. If you say something increases 25% each year, you can't just keep adding 25% of the original value! Silly.
  • striker410
    soo-nah-meeIt's not compound "interest", but it is compounding. If you say something increases 25% each year, you can't just keep adding 25% of the original value! Silly.

    I agree with the others on this one. Since it's adding 25% each year, it is compound. You are thinking of it from the wrong angle.
  • asymetriccircle
    ok i dont know all this interest shenanigans, but that first diagram, shouldn't the magnetic field be going the other way given the direction of current they show? i was just thinking right hand rule.
  • johnners2981
    soo-nah-meeIt's not compound "interest", but it is compounding. If you say something increases 25% each year, you can't just keep adding 25% of the original value! Silly.


    How's it silly? If you're going compound annually then why not compound it monthly, daily, hourly then???
  • soo-nah-mee
    johnners2981How's it silly? If you're going compound annually then why not compound it monthly, daily, hourly then???
    You HAVE to compound it at some interval, and since the author said 25% PER YEAR...
  • johnners2981
    soo-nah-meeYou HAVE to compound it at some interval, and since the author said 25% PER YEAR...


    You don't have to compound it, the author also says it doubles in 4 years which obviously involves NO COMPOUNDING
  • bobfrys
    Either way the author made a mistake. If you say density increases 25% a year that means 25% larger THAN THE PREVIOUS YEAR.

    If they extrapolated that 25% number from doubling every 4 years then they did their math wrong. It all depends which number is the real number, and which number did they incorrectly pulled out of their ass.
  • jamie_1318
    You have to compound it with the same length as the growth rate is factored in. That's the only way the metrics make sense. It means that each year is 25% more storage than the last year.
  • PhoneyVirus
    Getting this for Christmas from the girlfriend I have 18th edition witch was the best version for the FSB X48 last of its kind the good old days, the 19th Edition felt like there was to much information took out. I'm hoping 20th Packs the info about Core 5/7 and some AMD, I found older versions didn't talk about ADM much so again I hope its packed. Looking forward to reading the book this winter well after Christmas then Windows 7 inside out deluxe edition here I come.
  • Nnymrod
    Hard drives are really cool, and while SSDs are definitely better in almost every way, and are most definitely the future... I still like hearing platters spin up :) And they will be the best option for backup drives for awhile.
  • Haserath
    asymetriccircleok i dont know all this interest shenanigans, but that first diagram, shouldn't the magnetic field be going the other way given the direction of current they show? i was just thinking right hand rule.

    Actually he is showing the electron flow with the arrows in the first diagram, but the current is the 'positive flow' which is the opposite of the electron flow.
  • fstrthnu
    Well Tom's Hardware certainly did their homework here