This is used in both telecommunication and storage systems that move a medium past a fixed recording head.
[1] Specifically, RLL bounds the length of stretches (runs) of repeated bits during which the signal does not change.
If the runs are too long, clock recovery is difficult; if they are too short, the high frequencies might be attenuated by the communications channel.
Early disk drives used very simple encoding schemes, such as RLL (0,1) FM code, followed by RLL (1,3) MFM code, which were widely used in hard disk drives until the mid-1980s and are still used in digital optical discs such as CD, DVD, MD, Hi-MD and Blu-ray.
In order to convert the magnetic fields to binary data, some encoding method must be used to translate between the two.
In a simple example, consider the binary pattern 101 with a data window of 1 ns (one nanosecond, or one billionth of a second).
A speed variation of even 0.1%, which is more precise than any practical floppy drive, could result in 4 bits being added to or removed from the 4096-bit data stream.
To prevent this problem, data is coded in such a way that long repetitions of a single binary value do not occur.
By limiting the number of zeros written consecutively to some maximum k, this makes it possible for the drive controller to stay synchronized.
By limiting the number of zeros written in a row to some minimum d between each and every one, the overall frequency of polarity changes is reduced, allowing the drive to store more data in the same amount of space, resulting in either a smaller package for the same amount of data or more storage in the same size package.
RLL codes have found almost universal application in optical-disc recording practice since 1980.
[5][6] Generally run length is the number of bits for which signal remains unchanged.
In the encoded format a "1" bit indicates a flux transition, while a "0" indicates that the magnetic field on the disk does not change for that time interval.
Example: By extending the maximal run length to 2 adjacent 0 bits, the data rate can be improved to 4/5.
This is required because for any RLL code, the run-length limits – 0 and 2 in this case – apply to the overall modulated bitstream, not just to the components of it that represent discrete sequences of plain data bits.
There is a limit to how close in time flux transitions can be for reading equipment to detect them, and that constrains how closely bits can be recorded on the medium: In the worst case, with an arbitrary bit stream, there are two consecutive ones, which produces two consecutive flux transitions in time, so bits must be spaced far enough apart that there would be sufficient time between those flux transitions for the reader to detect them.
Western Digital WD5010A, WD5011A, WD50C12 Seagate ST11R, IBM Perstor Systems ADRC The encoded forms begin with at most 4, and end with at most 3 zero bits, giving the maximal run length of 7.
In particular, it is a (1,13|5) RLL code, where the final 5 indicates the additional constraint that there are at most 5 consecutive "10" bit pairs.