Run-Length-Limited Encoding Simulation

written by Teresa Carrigan

Run model in your browser



A random bit pattern is generated, from seven to ten bits long. This is the data that we want to store on the magnetic disk.

Starting from the left-most bit, we find a bit pattern (two to four bits) that has an RLL encoding. 10 becomes 0100, 11 becomes 1000, 000 becomes 000100, 010 becomes 100100, 011 becomes 001000, 0010 becomes 00100100, and 0011 becomes 00001000. This is repeated until the entire data bit pattern is encoded.

The RLL encoding of the data is then sent to the magnetic disk using NRZI transmission encoding. For each bit sent, both a synchronization clock pulse and the transmission waveform are displayed.


Applets on this website were written by Teresa Carrigan in 2004, for use in computer science courses at Blackburn College, with the exception of the Fireworks applet. The applets made with NetLogo require Java 1.4.1 or higher to run. The applets made with NetBeans require Java 1.4.2 or higher to run. Applets might not run on Windows 95 or Mac OS 8 or 9. You may obtain the latest Java plugin from Sun's Java site.