<s>
In	O
telecommunication	O
,	O
a	O
line	B-Protocol
code	I-Protocol
is	O
a	O
pattern	O
of	O
voltage	O
,	O
current	O
,	O
or	O
photons	O
used	O
to	O
represent	O
digital	O
data	O
transmitted	O
down	O
a	O
communication	O
channel	O
or	O
written	O
to	O
a	O
storage	B-General_Concept
medium	I-General_Concept
.	O
</s>
<s>
This	O
repertoire	O
of	O
signals	O
is	O
usually	O
called	O
a	O
constrained	O
code	O
in	O
data	B-General_Concept
storage	I-General_Concept
systems	O
.	O
</s>
<s>
Some	O
signals	O
are	O
more	O
prone	O
to	O
error	O
than	O
others	O
as	O
the	O
physics	O
of	O
the	O
communication	O
channel	O
or	O
storage	B-General_Concept
medium	I-General_Concept
constrains	O
the	O
repertoire	O
of	O
signals	O
that	O
can	O
be	O
used	O
reliably	O
.	O
</s>
<s>
Common	O
line	B-Protocol
encodings	I-Protocol
are	O
unipolar	B-Protocol
,	O
polar	B-Protocol
,	O
bipolar	B-Protocol
,	O
and	O
Manchester	B-Protocol
code	I-Protocol
.	O
</s>
<s>
After	O
line	B-Protocol
coding	I-Protocol
,	O
the	O
signal	O
is	O
put	O
through	O
a	O
physical	O
communication	O
channel	O
,	O
either	O
a	O
transmission	O
medium	O
or	O
data	B-General_Concept
storage	I-General_Concept
medium	I-General_Concept
.	O
</s>
<s>
The	O
most	O
common	O
physical	B-Application
channels	I-Application
are	O
:	O
</s>
<s>
the	O
line-coded	O
signal	O
(	O
the	O
baseband	B-Algorithm
signal	I-Algorithm
)	O
undergoes	O
further	O
pulse	B-Algorithm
shaping	I-Algorithm
(	O
to	O
reduce	O
its	O
frequency	O
bandwidth	O
)	O
and	O
then	O
is	O
modulated	B-Application
(	O
to	O
shift	O
its	O
frequency	O
)	O
to	O
create	O
an	O
RF	O
signal	O
that	O
can	O
be	O
sent	O
through	O
free	O
space	O
.	O
</s>
<s>
the	O
line-coded	O
signal	O
can	O
be	O
used	O
to	O
turn	O
on	O
and	O
off	O
a	O
light	O
source	O
in	O
free-space	O
optical	O
communication	O
,	O
most	O
commonly	O
used	O
in	O
an	O
infrared	O
remote	B-Protocol
control	I-Protocol
.	O
</s>
<s>
the	O
line-coded	O
signal	O
can	O
be	O
converted	O
to	O
magnetized	O
spots	O
on	O
a	O
hard	B-Device
drive	I-Device
or	O
tape	O
drive	O
.	O
</s>
<s>
the	O
line-coded	O
signal	O
can	O
be	O
converted	O
to	O
pits	O
on	O
an	O
optical	B-Device
disc	I-Device
.	O
</s>
<s>
Some	O
of	O
the	O
more	O
common	O
binary	O
line	B-Protocol
codes	I-Protocol
include	O
:	O
</s>
<s>
Signal	O
Comments	O
1	O
state	O
0	O
state	O
NRZ	O
–	O
L	O
Non-return-to-zero	B-Protocol
level	O
.	O
</s>
<s>
forces	O
a	O
high	O
level	O
forces	O
a	O
low	O
level	O
NRZ	O
–	O
M	O
Non-return-to-zero	B-Protocol
mark	O
forces	O
a	O
transition	O
does	O
nothing	O
(	O
keeps	O
sending	O
the	O
previous	O
level	O
)	O
NRZ	O
–	O
S	O
Non-return-to-zero	B-Protocol
space	O
does	O
nothing	O
(	O
keeps	O
sending	O
the	O
previous	O
level	O
)	O
forces	O
a	O
transition	O
RZ	O
Return	B-Protocol
to	I-Protocol
zero	I-Protocol
goes	O
high	O
for	O
half	O
the	O
bit	O
period	O
and	O
returns	O
to	O
low	O
stays	O
low	O
for	O
the	O
entire	O
period	O
Biphase	O
–	O
L	O
Manchester	O
.	O
</s>
<s>
forces	O
a	O
negative	O
transition	O
in	O
the	O
middle	O
of	O
the	O
bit	O
forces	O
a	O
positive	O
transition	O
in	O
the	O
middle	O
of	O
the	O
bit	O
Biphase	O
–	O
M	O
Variant	O
of	O
Differential	B-Protocol
Manchester	I-Protocol
.	O
</s>
<s>
forces	O
a	O
transition	O
keeps	O
level	O
constant	O
Biphase	O
–	O
S	O
Differential	B-Protocol
Manchester	I-Protocol
used	O
in	O
Token	O
Ring	O
.	O
</s>
<s>
keeps	O
level	O
constant	O
forces	O
a	O
transition	O
Differential	B-Protocol
Manchester	I-Protocol
(	O
Alternative	O
)	O
Need	O
a	O
Clock	O
,	O
always	O
a	O
transition	O
in	O
the	O
middle	O
of	O
the	O
clock	O
period	O
is	O
represented	O
by	O
no	O
transition	O
.	O
</s>
<s>
Bipolar	B-Protocol
The	O
positive	O
and	O
negative	O
pulses	O
alternate	O
.	O
</s>
<s>
Each	O
line	B-Protocol
code	I-Protocol
has	O
advantages	O
and	O
disadvantages	O
.	O
</s>
<s>
Line	B-Protocol
codes	I-Protocol
are	O
chosen	O
to	O
meet	O
one	O
or	O
more	O
of	O
the	O
following	O
criteria	O
:	O
</s>
<s>
The	O
simplest	O
possible	O
line	B-Protocol
code	I-Protocol
,	O
unipolar	B-Protocol
,	O
gives	O
too	O
many	O
errors	O
on	O
such	O
systems	O
,	O
because	O
it	O
has	O
an	O
unbounded	O
DC	O
component	O
.	O
</s>
<s>
Most	O
line	B-Protocol
codes	I-Protocol
eliminate	O
the	O
DC	O
component	O
such	O
codes	O
are	O
called	O
DC-balanced	O
,	O
zero-DC	O
,	O
or	O
DC-free	O
.	O
</s>
<s>
Use	O
a	O
constant-weight	B-Error_Name
code	I-Error_Name
.	O
</s>
<s>
Each	O
transmitted	O
code	O
word	O
in	O
a	O
constant-weight	B-Error_Name
code	I-Error_Name
is	O
designed	O
such	O
that	O
every	O
code	O
word	O
that	O
contains	O
some	O
positive	O
or	O
negative	O
levels	O
also	O
contains	O
enough	O
of	O
the	O
opposite	O
levels	O
,	O
such	O
that	O
the	O
average	O
level	O
over	O
each	O
code	O
word	O
is	O
zero	O
.	O
</s>
<s>
Examples	O
of	O
constant-weight	B-Error_Name
codes	I-Error_Name
include	O
Manchester	B-Protocol
code	I-Protocol
and	O
Interleaved	O
2	O
of	O
5	O
.	O
</s>
<s>
Use	O
a	O
paired	B-Protocol
disparity	I-Protocol
code	I-Protocol
.	O
</s>
<s>
Each	O
code	O
word	O
in	O
a	O
paired	B-Protocol
disparity	I-Protocol
code	I-Protocol
that	O
averages	O
to	O
a	O
negative	O
level	O
is	O
paired	O
with	O
another	O
code	O
word	O
that	O
averages	O
to	O
a	O
positive	O
level	O
.	O
</s>
<s>
Examples	O
of	O
paired	B-Protocol
disparity	I-Protocol
codes	I-Protocol
include	O
alternate	O
mark	O
inversion	O
,	O
8b/10b	B-Protocol
and	O
4B3T	B-Protocol
.	O
</s>
<s>
Bipolar	B-Protocol
line	B-Protocol
codes	I-Protocol
have	O
two	O
polarities	O
,	O
are	O
generally	O
implemented	O
as	O
RZ	O
,	O
and	O
have	O
a	O
radix	O
of	O
three	O
since	O
there	O
are	O
three	O
distinct	O
output	O
levels	O
(	O
negative	O
,	O
positive	O
and	O
zero	O
)	O
.	O
</s>
<s>
Polarity-insensitive	O
line	B-Protocol
codes	I-Protocol
compensate	O
in	O
these	O
channels	O
.	O
</s>
<s>
Examples	O
include	O
alternate	O
mark	O
inversion	O
,	O
Differential	B-Protocol
Manchester	I-Protocol
encoding	I-Protocol
,	O
coded	B-Protocol
mark	I-Protocol
inversion	I-Protocol
and	O
Miller	O
encoding	O
.	O
</s>
<s>
Examples	O
include	O
MLT-3	B-Protocol
encoding	I-Protocol
and	O
NRZI	O
.	O
</s>
<s>
For	O
reliable	O
clock	O
recovery	O
at	O
the	O
receiver	O
,	O
a	O
run-length	B-Protocol
limitation	I-Protocol
may	O
be	O
imposed	O
on	O
the	O
generated	O
channel	O
sequence	O
,	O
i.e.	O
,	O
the	O
maximum	O
number	O
of	O
consecutive	O
ones	O
or	O
zeros	O
is	O
bounded	O
to	O
a	O
reasonable	O
number	O
.	O
</s>
<s>
RLL	B-Protocol
codes	I-Protocol
are	O
defined	O
by	O
four	O
main	O
parameters	O
:	O
m	O
,	O
n	O
,	O
d	O
,	O
k	O
.	O
The	O
first	O
two	O
,	O
m/n	O
,	O
refer	O
to	O
the	O
rate	O
of	O
the	O
code	O
,	O
while	O
the	O
remaining	O
two	O
specify	O
the	O
minimal	O
d	O
and	O
maximal	O
k	O
number	O
of	O
zeroes	O
between	O
consecutive	O
ones	O
.	O
</s>
<s>
Specifically	O
,	O
RLL	B-Protocol
bounds	O
the	O
length	O
of	O
stretches	O
(	O
runs	O
)	O
of	O
repeated	O
bits	O
during	O
which	O
the	O
signal	O
does	O
not	O
change	O
.	O
</s>
<s>
By	O
modulating	B-Application
the	O
data	O
,	O
RLL	B-Protocol
reduces	O
the	O
timing	O
uncertainty	O
in	O
decoding	O
the	O
stored	B-General_Concept
data	I-General_Concept
,	O
which	O
would	O
lead	O
to	O
the	O
possible	O
erroneous	O
insertion	O
or	O
removal	O
of	O
bits	O
when	O
reading	O
the	O
data	O
back	O
.	O
</s>
<s>
This	O
mechanism	O
ensures	O
that	O
the	O
boundaries	O
between	O
bits	O
can	O
always	O
be	O
accurately	O
found	O
(	O
preventing	O
bit	B-General_Concept
slip	I-General_Concept
)	O
,	O
while	O
efficiently	O
using	O
the	O
media	O
to	O
reliably	O
store	O
the	O
maximal	O
amount	O
of	O
data	O
in	O
a	O
given	O
space	O
.	O
</s>
<s>
Early	O
disk	B-General_Concept
drives	I-General_Concept
used	O
very	O
simple	O
encoding	B-Protocol
schemes	I-Protocol
,	O
such	O
as	O
RLL	B-Protocol
(	O
0	O
,	O
1	O
)	O
FM	B-Protocol
code	O
,	O
followed	O
by	O
RLL	B-Protocol
(	O
1	O
,	O
3	O
)	O
MFM	B-Protocol
code	O
which	O
were	O
widely	O
used	O
in	O
hard	B-Device
disk	I-Device
drives	I-Device
until	O
the	O
mid-1980s	O
and	O
are	O
still	O
used	O
in	O
digital	O
optical	B-Device
discs	I-Device
such	O
as	O
CD	B-Device
,	O
DVD	O
,	O
MD	O
,	O
Hi-MD	O
and	O
Blu-ray	O
using	O
EFM	B-Protocol
and	O
EFMPLus	B-Protocol
codes	O
.	O
</s>
<s>
Higher	O
density	O
RLL	B-Protocol
(	O
2	O
,	O
7	O
)	O
and	O
RLL	B-Protocol
(	O
1	O
,	O
7	O
)	O
codes	O
became	O
the	O
de	O
facto	O
standards	O
for	O
hard	B-Device
disks	I-Device
by	O
the	O
early	O
1990s	O
.	O
</s>
<s>
Line	B-Protocol
coding	I-Protocol
should	O
make	O
it	O
possible	O
for	O
the	O
receiver	O
to	O
synchronize	O
itself	O
to	O
the	O
phase	O
of	O
the	O
received	O
signal	O
.	O
</s>
<s>
Biphase	O
line	B-Protocol
codes	I-Protocol
require	O
at	O
least	O
one	O
transition	O
per	O
bit	O
time	O
.	O
</s>
<s>
A	O
line	B-Protocol
code	I-Protocol
will	O
typically	O
reflect	O
technical	O
requirements	O
of	O
the	O
transmission	O
medium	O
,	O
such	O
as	O
optical	B-Architecture
fiber	I-Architecture
or	O
shielded	O
twisted	O
pair	O
.	O
</s>
