The format of information recorded on magnetic (or optical) disk, allowing a system to recognize, control, and verify the data. There are two levels at which formats are defined.
The common methods of encoding are as follows.
Run-length limited encoding (RLL) is a form of NRZ (nonreturn to zero) recording in which groups of bits are mapped into larger groups before recording. A frequently used method known as 2–7 (at least 2 zeros between ones and no more than 7 zeros between ones) uses the “n to 2n” mapping table shown in the diagram. The restriction of 2 zeros between ones allows increased packing density and reduced intersymbol interference of the magnetic pattern, and that of no more than 7 zeros between ones eases the design of the phase-locked loop. Other similar codes are GCR (group code recording), which breaks the data stream into 4-bit groups and maps these into 5-bit groups, EIR (error-indicating recording), a form of 4 to 6 mapping that uses only the groups with odd parity, i.e. 3 or 5 ones, and 3PM (three-phase modulation), which has a minimum sequence of 2 zeros and a maximum of 11 zeros.
Frequency modulation (FM; F2F) is a form of self-clocking recording. The beginning of each bit cell is marked by a clock pulse recorded as a change in the direction of the magnetic flux. If the cell is to represent a binary 1 a second pulse or transition is written at the center of the cell, otherwise there is no further change until the start of the next cell. If the frequency of the clock is F then a stream of 1s will result in a frequency of 2F (hence F2F recording). In this form of recording the minimum separation between transitions is half of one cell and the maximum is one cell.