Floppy Disk Concepts
If you are already familiar with floppy disks, their operation and organization, skip ahead to the floppy data encoding section.
The floppy disk was the most common form of removable, rewritable storage on the IBM PC. Even when physical distribution of commercial software had moved to the CD-ROM, users still found the floppy disk useful day-to-day for moving files between systems. The main advantage of the floppy disk was its sheer ubiquity — nearly every PC had a floppy drive.
The floppy disk gets its name from its flexibility. If held only by one corner, the disk would easily flex or ‘flop’ when moved.
The floppy disk was originally invented by IBM, which coined the term diskette to refer to their 8“ floppy disks, sometime around the time the IBM 3740 was introduced; however, floppy disks had already been in use for several years by then. The name diskette was frequently seen on floppy disk retail packaging, but colloquially, most people just called them floppies.
A floppy drive was technically an optional add-on for the original PC, but the near total absence of software titles available for the PC on cassette made at least one floppy drive a mandatory purchase.
Floppy disks have existed in numerous forms over the entire history of computing, but the original format used on the PC was the 5.25“ diskette.
| Size | Approx. era | Formatted capacities | Notes |
|---|---|---|---|
| 8“ | 1970s | about 80KiB to 1200KiB | The original commercial floppy format. Used by IBM and early CP/M systems. |
| 5.25“ | late 1970s-1980s | about 90KiB to 1200KiB | The dominant early microcomputer format and the original IBM PC diskette size. |
| 3.5“ | mid-1980s-1990s | 720KiB, 1440KiB, and 2880KiB | A smaller rigid-shell format that gradually replaced 5.25-inch media on PCs. |
| 3“ | mid-1980s | about 180KiB per side to 720KiB | A less common format used mainly by Amstrad and a few other systems. |
Basic Floppy Operation
A floppy disk is a ferromagnetic medium upon which data can be stored by magnetizing the medium in specific patterns. Data is read from and written to the disk via magnetic heads located within a floppy disk drive. A floppy disk drive stores data on a floppy disk in a series of concentric rings called tracks. The magnetic heads travel on a linear carriage controlled by a stepper motor which positions the heads above a specific track to be read or written.
The 5.25“ Diskette
A 5.25“ floppy disk consists of a vinyl jacket covering a circular disc of biaxially oriented polyethylene terephthalate, more commonly known by its brand name, Mylar. A polymeric coating containing carefully milled ferric oxide powder was applied to the surface of this disc, which could then be deliberately magnetized to store specially-encoded data. This inner disc is sometimes referred to as the cookie (or biscuit, if you are from the UK).
The vinyl jacket of a floppy disk has several cutouts. A central hole exposes the inner rim of the Mylar disc which is clamped against the floppy drive spindle when a disk is inserted into a drive and the drive door (sometimes just a lever) is closed. The drive’s spindle motor could then rotate the cookie within the stationary jacket, typically around 300RPM.
A pill-shaped cutout called the data window exposes the usable region of the cookie on both sides, accommodating the full linear travel of the drives’ magnetic heads.
A 5.25" Floppy Disk (Click to zoom)
Near the central spindle, a circular cutout in the jacket allows a photosensor to detect light through a small hole in the Mylar disc called the index hole. When this photosensor — called the index sensor — detects light through the index hole, the drive generates an index pulse. The floppy controller uses the index pulse to know where to start initializing or formatting a track of data. Once a track has been fully written, the index sensor only serves as a useful operational timeout — any disk operation typically must complete within two revolutions of the disk or two index pulses. Not all computer systems utilized an index sensor, with the Apple II the most famous of systems that did not.
The write-protect notch is a rectangular cutout on the right side of the floppy disk that permits data to be written to the floppy disk. A small sticker could be folded over the side of the floppy disk to cover this notch, which would then prevent the host computer from writing data to the disk.
Note
The effect of a write-protect sticker is reversed on 5.25“ disks from the logic used by earlier 8“ disks — on an 8“ disk, you apply a sticker to make the disk writable! This change may have been driven by the increasing importance of commercial software distribution on floppy, allowing manufacturers to produce “notchless” disks that couldn’t be easily overwritten.
The inside of the jacket contains a dust-collecting liner which served the essential function of keeping the inner cookie clean. This part of the floppy may be considered consumable; over time only so much dust can be captured and larger, grittier particles trapped in the liner may even cause damage. Therefore, storing floppy disks in closed, dust-free containers was well-advised.
5.25“ floppy disks were somewhat fragile. They were susceptible to damage from improper handling such as creasing or bending, or directly touching the magnetic coating visible through the data window. Exposure to magnets could damage or erase the data stored on the floppy. That said, if treated with care, the floppy disk was a fairly reliable storage medium.
Over time, floppy disks have faced new challenges. Heat and humidity in long-term storage can lead to the oxide coating flaking off, or mold growth on the cookie which can contaminate the inner lining. Even so, if stored carefully, many floppy disks can still be read a half-century later.
The original floppy diskette was 8“. When the 5.25“ disk was introduced, its smaller size required it to be distinguished from the standard 8“ floppy, and so 5.25“ diskettes were sometimes called minifloppies. Seeing the term minifloppy is a good sign you are reading an older reference.
Single and Double Sided Floppies
The oldest floppy drives were single-sided — they possessed a single magnetic head to read and write data, which was done from the bottom side of the floppy if inserting it label-side up. Single-sided disks could sometimes be flipped over to use the other side, much as you might flip over a vinyl record. These so-called flippy disks could be easily identified by the presence of two index hole cutouts — and sometimes two write-protect notches.
A double-sided floppy drive has two magnetic heads, which clamp together to press against opposite sides of the cookie. You can see an image of a double-sided drive’s magnetic heads below. Head 0, which accesses side 0, is located on the bottom, with side 1 accessed from the top.
The top head is usually on some sort of actuator, where it can be lowered onto the disk surface to clamp the cookie between both heads. This clamping action is called head loading. In a single-sided drive, a foam pad typically provides the clamping force in the absence of an opposing head.
A double-sided floppy drive's magnetic heads
5.25“ Floppy Capacities
5.25“ floppy disks on the IBM PC were available in the following capacities:
| Formatted size | Sides | Tracks | Sectors per track | Notes |
|---|---|---|---|---|
| 160KiB | 1 | 40 | 8 | Original IBM PC single-sided disk |
| 180KiB | 1 | 40 | 9 | Single-sided format with one additional sector per track |
| 320KiB | 2 | 40 | 8 | Double-sided version of the original PC layout |
| 360KiB | 2 | 40 | 9 | Standard double-sided double-density PC format |
| 720KiB | 2 | 80 | 9 | 80-track ‘quad-density’ format, less common on PC |
| 1200KiB | 2 | 80 | 15 | High-density format introduced with the IBM PC AT |
High Density 5.25“ Drive Quirks
One way high-density 5.25“ disk drives increased capacity was by doubling the number of tracks written to high-density 5.25“ diskettes. To do so, the size of the magnetic head itself was made thinner. This can create issues when writing data to double-density diskettes that are then read in a double-density drive with a wider head.
Many high-density 5.25“ drives increase the rotational rate of the cookie to 360RPM, although this can often be controlled by a jumper on the drive. Leaving this setting at 360RPM can cause inaccurate flux timing readings when making flux-level images of double-density diskettes. This can be corrected after the fact, but is not ideal as it can interfere with proper imaging of some copy protection techniques. It is best to image double-density floppy disks in a double-density drive, or at least a high-density drive with the 300RPM mode selected.
The 3.5“ Diskette
The 3.5“ floppy disk was an improvement over the 5.25“ floppy in capacity, durability, and convenience. The 3.5“ floppy disk employed a rigid plastic shell and a metal, spring-loaded shutter to protect the cookie from dust and contact with fingers. A rectangular hole — which could be covered by an integrated plastic slider — controlled whether the disk could be written to or not, meaning awkward stickers were no longer required. When the hole was unobstructed by the slider, the disk was write-protected.
A 3.5" Floppy Disk (Click to zoom)
Later high-density variations of the 3.5“ floppy could be identified by a second hole on the opposite side from the write-protect hole. This allowed the drive to recognize the disk as high density. In addition, a “HD” logo was usually printed on or molded into the plastic shell.
3.5“ diskettes are sometimes referred to as microfloppies.
Note
In more recent years, a contentious debate can occasionally arise over whether the hard-shelled 3.5“ disks were referred to as “floppy disks” — primarily due to their distinct lack of being floppy. The term “floppy disk” generally applied to 3.5“ disks as well in English-speaking countries with the exception of South Africa, where 3.5“ disks were routinely called “stiffy disks”1.
In other countries, other terminology may have been common, but most computer users would have been familiar with the term “floppy disk” in reference to 3.5“ diskettes due to the predominance of US and UK-based media.
3.5“ Floppy Capacities
3.5“ floppy disks on the IBM PC were available in the following capacities:
| Formatted size | Sides | Tracks | Sectors per track | Notes |
|---|---|---|---|---|
| 720KiB | 2 | 80 | 9 | Double-density |
| 1440KiB | 2 | 80 | 18 | High-density: the most common 3.5“ format, but not supported by the original PC |
| 2880KiB | 2 | 80 | 36 | Extra-high density (not common) |
Magnetic Encoding
A floppy disk, like any digital medium, ultimately stores 0s and 1s. A floppy disk encodes binary bits by means of changing magnetic flux.
The Mylar cookie of a floppy disk has a polymeric coating applied to it containing very fine, ferromagnetic particles. On a blank, unformatted disk, these particles are not magnetized in any specific direction. To write data to a floppy disk, the drive magnetizes these particles in specific patterns along concentric rings called tracks.
It might help to visualize the ferromagnetic coating as if it were a number of very small bar magnets with a north and south pole. Data is encoded by alternating the magnetic polarization along a single track as the disk rotates beneath the write head. This is called longitudinal recording.
Note
Later 2880KiB — or “Extra-high density” — floppy drives utilized perpendicular recording, which will not be discussed here.
The ferromagnetic coating is magnetized by the drive’s magnetic write head. A photograph of such a head can be seen below.
The floppy disk write head in a TEAC FD-55BR disk drive
A floppy disk write head
By periodically changing the magnetic orientation, small regions where the polarity flips are also created — these regions are called flux reversals or flux transitions.
A flux transition (representational, not to scale — click to zoom)
When reading a floppy disk, it is these transitions that the drive detects, via Faraday’s Law of Induction. The change in the magnetic field induces a voltage in the coil attached to the read head, creating an electrical signal that can be amplified and turned into a read pulse. These read pulses are sent to a floppy controller, which uses the time between each pulse to recreate the actual bits encoded on the disk.
Data Encoding
The actual bits stored on a floppy disk represent an encoded form of the data written to the disk. Earlier 8“ floppy disks typically used frequency modulation (FM) encoding, whereas most floppy disks for the PC utilize modified frequency modulation (MFM) encoding.
Although FM mode was seldom used, the IBM PC floppy controller could be operated in both FM and MFM modes. The controller would need to be set to the correct mode to successfully read back data originally written with that mode.
The purpose of both encoding schemes is to add clock bits that provide timing information, a technique known as clock recovery.
A requirement for successful clock recovery from the encoded bit stream is ensuring that 1 bits are regularly encoded. This in turn ensures that regular flux transitions are written to the disk. The absence of a flux transition over too long a period risks creating an unstable condition where data cannot be reliably read. As a general rule, no more than three consecutive 0 bits are allowed in the encoded bitstream written to a floppy disk track.
The next chapter, Floppy Data Encoding, covers this subject in more detail.
Density
Density in terms of floppy disks refers to how tightly and efficiently data can be encoded onto a track. Initially this was a combination of both encoding methods and packing flux transitions more tightly together.
All standard floppy disk formats used on an IBM PC use MFM encoding. As this was a space savings improvement over the original FM encoding, this led to the terminology of the double-density diskette often seen on retail packaging and diskette labels. If you were ever curious if there was a “single-density” diskette — these were actually referred to as standard density, but were never used on the PC.
PC floppy disk encoding never moved beyond MFM. Therefore, when high-density and extra-high-density disks emerged, this extra density was simply the result of packing flux transitions more tightly together. This usually necessitated more advanced formulations of ferromagnetic coatings, using more exotic or specially-doped oxides.
Rotation
If viewed from the top, a floppy disk drive rotates the cookie in a clockwise direction, and therefore data is written to the cookie counter-clockwise. When viewed from beneath the drive (from the perspective of head 0), the cookie rotates in a counter-clockwise direction, and therefore data is written clockwise. This rotation is often reflected by disk visualization software.
Most floppy drives on the PC rotate the cookie at 300RPM except for 5.25“ high-density disk drives, which often rotate the cookie at 360RPM.
Note
Some 3.5“ drives — mostly used on non-IBM-PC compatible systems — could rotate at 360RPM, or even at variable RPM depending on which track was being read. These will not be discussed further in this book.
Floppy Disk Organization and Addressing
A floppy disk stores concentric rings of data called tracks. Tracks are identified by a 0-based index, starting at the outer extent of the drive head’s travel (closest to the edge of the disk), counting upwards as the tracks proceed inwards toward the spindle hole. This index is called the cylinder number. A track can be uniquely identified by combining the cylinder number with a specific head, indicating which side of the floppy the track is on.
Tip
The distinction between tracks and cylinders may be somewhat confusing. Think of it as a coordinate system where a track is a combination of cylinder and head — the cylinder specifies how far from the outer edge of the data the drive head should be positioned, and the head determines on which side of the disk the track is located. On a double-sided disk, a cylinder can therefore refer to two unique tracks, one on each side of the disk. On a single-sided disk, the concepts of track and cylinder are fundamentally equivalent.
A floppy drive selects a specific cylinder to operate on by physically moving the magnetic heads until they are over the cylinder. Since the carriage the magnetic heads are on is actuated by a stepper motor, the process of moving from one cylinder to the next is called stepping.
Most PC floppy drives contain a special sensor that can indicate when the magnetic head is positioned at the outermost cylinder. This is called the track 0 sensor. If the position of the magnetic head ever becomes indeterminate, the drive can be recalibrated by seeking to track 0.
Each track contains one or more sectors. Each sector is identified by a sector ID consisting of the cylinder number, head number, sector number, and a sector size specifier. Sector numbers typically begin with 1 on each track by convention, but nothing actually guarantees this.
The combination of cylinder, head, and sector number can uniquely identify a sector on a normally formatted floppy disk. This is sometimes referred to as CHS addressing, which you may also see referenced in the context of early hard drives.
Sectors are aligned on each track by synchronizing to the index pulse created by a photodiode that detects light shining through the physical index hole. With each sector on each track aligned, a floppy disk resembles something like pie slices. Individual sectors are separated by small areas of padding called sector gaps.
Floppy disks are often visualized using diagrams with an exaggerated inner diameter with the index position at the right side, like the one below.
A typical sector layout on a 5.25" 360KiB floppy disk, as seen from head 0 (not to scale)
If one could see the actual track layout on a 5.25“ disk, it would be condensed into the region visible through the data window and accessible along the full travel of the floppy drive’s head carriage. The following diagram attempts to reproduce such an image:
A typical sector layout on a 5.25" 360KiB floppy disk, as seen from head 1
The specification of how data is organized on any given track of a floppy disk is called its track format.
The track format of IBM floppy disks is sometimes referred to as System 34 format, in reference to the IBM System/34, which utilized this format before the PC.
The process of writing out a standard format consisting of a prescribed number of sectors is called formatting. This operation can be performed by a floppy controller with a special formatting command on a per-track basis, but most users will be familiar with formatting an entire disk at a time using a utility such as MS-DOS’s FORMAT.COM.
Sectors: Soft vs Hard
All floppy disks for the PC are soft-sectored. You may see this description as you read various references and wonder what it means. Some earlier 8“ floppy disks were hard-sectored in that they had physical holes punched into the cookie that delineated sector boundaries on the disk. These holes were placed on a radial path aligned with the index hole and so could be read via the same photosensor.
Sectors may be placed anywhere on a PC-formatted floppy disk, thus we can say they are the opposite of hard-sectored: soft-sectored.
Standard PC Floppy Disk Specifications
| 5.25" | 3.5" | |||||||
|---|---|---|---|---|---|---|---|---|
| Standard Capacity | 160KiB | 180KiB | 320KiB | 360KiB | 1200KiB | 720KiB | 1440KiB | 2880KiB |
| Physical Dimensions | 5.25" | 5.25" | 5.25" | 5.25" | 5.25" | 3.5" | 3.5" | 3.5" |
| Default Encoding | MFM | MFM | MFM | MFM | MFM | MFM | MFM | MFM |
| Density | DD | DD | DD | DD | HD | DD | HD | ED |
| Cylinders | 40 | 40 | 40 | 40 | 80 | 80 | 80 | 80 |
| Heads | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 |
| Tracks | 40 | 40 | 80 | 80 | 160 | 160 | 160 | 160 |
| Sector Offset | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| Sectors Per Track | 8 | 9 | 8 | 9 | 15 | 9 | 18 | 36 |
| Total Sectors | 320 | 360 | 640 | 720 | 2400 | 1440 | 2880 | 5760 |
| RPM | 300 | 300 | 300 | 300 | 360 | 300 | 300 | 300 |
| Revolution Time | 200ms | 200ms | 200ms | 200ms | 166ms | 200ms | 200ms | 200ms |
| Raw bit rate (kbps) | 500 | 500 | 500 | 500 | 1000 | 500 | 1000 | 2000 |
| MFM Data rate (kbps) | 250 | 250 | 250 | 250 | 500 | 250 | 500 | 1000 |
| kb/track | 50 | 50 | 50 | 50 | 83.3 | 50 | 100 | 200 |
| Bitcell/track | 100000 | 100000 | 100000 | 100000 | 166666 | 100000 | 200000 | 400000 |
| TPI | 48 | 48 | 48 | 48 | 96 | 135 | 135 | 135 |