RLL

…some notes in preparation for an actual document on the subject…

RLL codes are defined by four main parameters:

m, n refer to the rate of the code
d minimal number of zeroes between consecutive ones
k maximal number of zeroes between consecutive ones

 

(0,1): FM

data encoded
0 10
1 11

The first bit of the encoded symbol functions as a clock pulse.

Encoding example

Data: 0011 0010 0111 0110 1000

Encoded:
  0   0   1   1   0   0   1   0   0   1   1   1   0   1   1   0   1   0   0   0
 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0
_╱‾‾‾╲___╱‾╲_╱‾╲_╱‾‾‾╲___╱‾╲_╱‾‾‾╲___╱‾╲_╱‾╲_╱‾╲_╱‾‾‾╲_╱‾╲_╱‾╲___╱‾╲_╱‾‾‾╲___╱‾‾‾
–|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––

40 units, 29 edges, 20 in-signal clock pulses

 

(1,2): Differential Manchester

data encoded
0 11
1 01

The second bit of the encoded symbol functions as a clock pulse.

Encoding example

Data: 0011 0010 0111 0110 1000

Encoded:
  0   0   1   1   0   0   1   0   0   1   1   1   0   1   1   0   1   0   0   0
 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1
_╱‾╲_╱‾╲___╱‾‾‾╲_╱‾╲_╱‾╲___╱‾╲_╱‾╲_╱‾‾‾╲___╱‾‾‾╲_╱‾╲___╱‾‾‾╲_╱‾╲___╱‾╲_╱‾╲_╱‾╲_╱‾
–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–––|–

40 units, 31 edges, 20 in-signal clock pulses

 

(1,3): MFM

First, there’s the basic conversion table

data encoded
0 x0

0x01
1x10

1 01

But then there‘s the formula x, y, zx, x+y, y, y+z, z (etc) which has the units overlapping…

000 0101
001 0100
010 0010
011 0010
100 1001
101 1000
110 1010
111 1010
Encoding example (units don't overlap)

Data: 0011 0010 0111 0110 1000

Encoded:
    0   0   1   1   0   0   1   0   0   1   1   1   0   1   1   0   1   0   0   0
   x 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0
   x___╱‾‾‾‾‾╲___╱‾‾‾‾‾╲_____╱‾‾‾‾‾╲_____╱‾‾‾╲___╱‾‾‾‾‾‾‾╲___╱‾‾‾‾‾‾‾╲_____╱‾‾‾╲___
   x––|–––·–––·–––·–––|–––·–––·–––|–––·–––·–––·–––·–––·–––·–––·–––·–––·–––|–––|–––

40 units, 14 edges, 5 in-signal clock pulses

Encoding example (units overlap)

Data: 0011 0010 0111 0110 1000

Encoded:
    0   0   1   1   0   0   1   0   0   1   1   1   0   1   1   0   1   0   0   0
   0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 0
  x__╱‾‾‾‾‾╲___╱‾‾‾‾‾╲_____╱‾‾‾‾‾╲_____╱‾‾‾╲___╱‾‾‾‾‾‾‾╲___╱‾‾‾‾‾‾‾╲_____╱‾‾‾╲_____
  x–––·–––|–––|–––·–––·–––|–––·–––·–––|–––|–––|–––·–––|–––|–––·–––|–––·–––·–––·–––x

40 units, 14 edges, 9 in-signal clock pulses

Clock pulses seem to come at unit boundaries "0 1"

 

(0,2): GCR

data IBM CBM
0000 11001 01010
0001 11011 01011
0010 10010 10010
0011 10011 10011
0100 11101 01110
0101 10101 01111
0110 10110 10110
0111 10111 10111
1000 11010 01001
1001 01001 11001
1010 01010 11010
1011 01011 11011
1100 11110 01101
1101 01101 11101
1110 01110 11110
1111 01111 10101

Data: 0011 0010 0111 0110 1000

Encoded (IBM):
      0011      0010      0111      0110      1000
 1 0 0 1 1 1 0 0 1 0 1 0 1 1 1 1 0 1 1 0 1 1 0 1 0 
_╱‾‾‾‾‾╲_╱‾╲_____╱‾‾‾╲___╱‾╲_╱‾╲___╱‾╲___╱‾╲___╱‾‾‾
25 units, 15 edges

Encoded (CBM):
      0011      0010      0111      0110      1000
 1 0 0 1 1 1 0 0 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1
_╱‾‾‾‾‾╲_╱‾╲_____╱‾‾‾╲___╱‾╲_╱‾╲___╱‾╲_____╱‾‾‾‾‾╲_
25 units, 14 edges

 

(1,7)

data Jacoby & Kost DC Free Cirrus
00 101 x01 010

0x → 01
1x → 10

01 100 010
10 001 x00 x01
11 010 x00
0000 101000
0001 100000
0100 010001
0101 010000
0110 x00001
0111 x00000
1000 001000
1001 010000
1100 010001
1101 x00000
1110 x00001
1111 010000

Data: 0011 0010 0111 0110 1000

Encoded (J&K):
  00 11 00  1001 11 01 10  1000
 101010101010000010100001001000
_╱‾╲_╱‾╲_╱‾╲_____╱‾╲____╱‾‾╲___

15 units, 10 edges

Encoded (DC Free):
  00  1100 10 01  1101 10 10 00
 x01010001000010100001000100101
_╱‾╲_╱‾‾‾╲____╱‾╲____╱‾‾‾╲__╱‾╲_

15 units, 9 (10) edges

Encoded (Cirrus):
  00 11 00 10  0111  0110 10 00
 010000010101000000100001001010
__╱‾‾‾‾‾╲_╱‾╲______╱‾‾‾‾╲__╱‾╲_

15 units, 8 edges

J&K:

    x,yx, xy, y
    x,0,0,yx, xy, y,0,0,0

00 00” → “101000”, to avoid “101101

 

(2,7)

data WD encoded Seagate encoded Perstor encoded
10 0100 0100 0100
11 1000 1000 1000
000 100100 000100 100100
001 001000
010 000100 100100 000100
011 001000 001000
0010 00100100 00100100
0011 00001000 00001000
0110 00100100
0111 00001000

Data: 0011 0010 0111 0110 1000

Encoded (WD):
     0011    0010   011  10  11   010   000
 000010000010010000100001001000000100100100
_____╱‾‾‾‾‾╲__╱‾‾‾‾╲____╱‾‾╲______╱‾‾╲__╱‾‾
21 units, 9 edges

Encoded (Seagate):
     0011    0010   011  10  11   010   000
 000010000010010000010001001000100100000100
_____╱‾‾‾‾‾╲__╱‾‾‾‾‾╲___╱‾‾╲___╱‾‾╲_____╱‾‾
21 units, 9 edges

Encoded (Perstor):
    001  10   010    0111    0110  10   000
 001000010000010000001000001001000100100100
___╱‾‾‾‾╲_____╱‾‾‾‾‾‾╲_____╱‾‾╲___╱‾‾╲__╱‾‾
21 units, 9 edges

 

(1,13): HHH

data encoded
00 010
01 001
10 100
11 101
0110 001000
0111 010000
1110 101000
1111 100000
001100 010000000
001101 001000000
101100 100000000
101101 101000000
00111011 010000000000
10111011 100000000000

Designed for IrDA transfer rather than magnetic storage.

Data: 0011 0010 0111 0110 1000

Encoded:
                  001100    10        0111        0110    10    00
       0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0
  IR: __╱‾╲_____________╱‾╲_____╱‾╲___________╱‾╲_____╱‾╲_____╱‾╲_
  DC: ___╱‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾╲_______╱‾‾‾‾‾‾‾‾‾‾‾‾‾╲_______╱‾‾‾‾‾‾‾╲__
30 units, 6 edges

 


Links