run-length-limited · end of life · also RLL, (d,k) code, run-length-limited code

Run-length limited (RLL) encoding

Run-length-limited (RLL) encoding is a recording code that keeps at least d and at most k zeros between successive ones, so pulses neither crowd nor lose clock sync.

In magnetic recording a 1 is a change of polarity and a 0 no change. Ones that are too close make readback pulses interfere, and long runs of zeros leave the read clock without peaks. A (d,k) constraint therefore bounds the zeros between ones, with d against interference and k for timing. Tape systems used (1,7) and (2,7), flexible disks (1,3), and compact disc and DVD use (2,10). [3]

The Shannon capacity of a (d,k) constraint is log2 of the largest eigenvalue of its transition matrix, and a practical code uses a rate m/n below it, such as 1/2 for (1,3) against 0.5515, 1/2 for (2,7) against 0.5172 and 2/3 for (1,7) against 0.679. At equal user density, rate-1/2 (2,7) has 50% more minimum transition spacing than MFM, while rate-2/3 (1,7) has 33% more spacing and a 33% wider detection window. A model calculation credits codes with about a 2.5x linear-density gain since 1966. [2]

PRML detection replaced peak detection in many applications and uses (0,G/I) constraints in which adjacent transitions may interfere. [3] PR4-based PRML channels reached 15 to 25% higher linear density than RLL-coded peak detection, and EPR4 about 15% more. [4]

Relations

related
Hard disk drive (HDD), Longitudinal magnetic recording, PRML detection, Reed–Solomon codes (storage), Floppy disk, Areal density

Limitations

  • Rate-2/3 (1,7) has an 11% smaller minimum spacing than rate-1/2 (2,7), so its wider window is a trade-off. [2]

Citations

  1. Recording codes for digital magnetic storage (accessed 2026-10-16)
  2. Channels and Constraints (accessed 2026-10-16)
  3. Codes for Digital Recorders (accessed 2026-10-16)

Further reading

  1. Run-length limited (RLL) encoding (accessed 2026-03-26)
Sources & caveats
  • c2 is a 1985 tutorial and c4 a 1998 survey, both author-hosted; c3 is an unsigned textbook chapter hosted by UCSD CMRR.
  • Figures are model and survey values, not measurements of current drives.
  • Arithmetic: rate / capacity = 0.5 / 0.5515 = 91%, 0.5 / 0.5172 = 97%, 0.667 / 0.679 = 98%; density ratio (d+1) x rate = 1.0 for MFM, 1.5 for (2,7), 1.33 for (1,7).

JSON: /data/terms/run-length-limited.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Run-length limited (RLL) encoding. Hesela. 2026-10-22. https://hesela.dev/terms/run-length-limited/