<s>
In	O
coding	B-Error_Name
theory	I-Error_Name
,	O
a	O
constant-weight	B-Error_Name
code	I-Error_Name
,	O
also	O
called	O
an	O
m-of-n	B-Error_Name
code	I-Error_Name
,	O
is	O
an	O
error	B-Error_Name
detection	I-Error_Name
and	I-Error_Name
correction	I-Error_Name
code	O
where	O
all	O
codewords	O
share	O
the	O
same	O
Hamming	O
weight	O
.	O
</s>
<s>
The	O
one-hot	O
code	O
and	O
the	O
balanced	B-Error_Name
code	I-Error_Name
are	O
two	O
widely	O
used	O
kinds	O
of	O
constant-weight	B-Error_Name
code	I-Error_Name
.	O
</s>
<s>
Most	O
of	O
the	O
work	O
on	O
this	O
field	O
of	O
discrete	O
mathematics	O
is	O
concerned	O
with	O
binary	O
constant-weight	B-Error_Name
codes	I-Error_Name
.	O
</s>
<s>
Binary	O
constant-weight	B-Error_Name
codes	I-Error_Name
have	O
several	O
applications	O
,	O
including	O
frequency	B-Protocol
hopping	I-Protocol
in	O
GSM	O
networks	O
.	O
</s>
<s>
Most	O
barcodes	O
use	O
a	O
binary	O
constant-weight	B-Error_Name
code	I-Error_Name
to	O
simplify	O
automatically	O
setting	O
the	O
brightness	O
threshold	O
that	O
distinguishes	O
black	O
and	O
white	O
stripes	O
.	O
</s>
<s>
Most	O
line	B-Protocol
codes	I-Protocol
use	O
either	O
a	O
constant-weight	B-Error_Name
code	I-Error_Name
,	O
or	O
a	O
nearly-constant-weight	O
paired	B-Protocol
disparity	I-Protocol
code	I-Protocol
.	O
</s>
<s>
In	O
addition	O
to	O
use	O
as	O
error	B-Error_Name
correction	I-Error_Name
codes	O
,	O
the	O
large	O
space	O
between	O
code	O
words	O
can	O
also	O
be	O
used	O
in	O
the	O
design	O
of	O
asynchronous	B-Application
circuits	I-Application
such	O
as	O
delay	B-General_Concept
insensitive	I-General_Concept
circuits	I-General_Concept
.	O
</s>
<s>
Constant-weight	B-Error_Name
codes	I-Error_Name
,	O
like	O
Berger	B-Error_Name
codes	I-Error_Name
,	O
can	O
detect	O
all	O
unidirectional	B-Error_Name
errors	I-Error_Name
.	O
</s>
<s>
The	O
central	O
problem	O
regarding	O
constant-weight	B-Error_Name
codes	I-Error_Name
is	O
the	O
following	O
:	O
what	O
is	O
the	O
maximum	O
number	O
of	O
codewords	O
in	O
a	O
binary	O
constant-weight	B-Error_Name
code	I-Error_Name
with	O
length	O
,	O
Hamming	O
distance	O
,	O
and	O
weight	O
?	O
</s>
<s>
A	O
special	O
case	O
of	O
constant	B-Error_Name
weight	I-Error_Name
codes	I-Error_Name
are	O
the	O
one-of-N	O
codes	O
,	O
that	O
encode	O
bits	O
in	O
a	O
code-word	O
of	O
bits	O
.	O
</s>
<s>
An	O
example	O
is	O
dual	O
rail	O
encoding	O
,	O
and	O
chain	O
link	O
used	O
in	O
delay	B-General_Concept
insensitive	I-General_Concept
circuits	I-General_Concept
.	O
</s>
<s>
biphase	B-Protocol
mark	I-Protocol
code	I-Protocol
uses	O
a	O
1-of-2	O
code	O
;	O
</s>
<s>
pulse-position	B-Device
modulation	I-Device
uses	O
a	O
1-of-n	O
code	O
;	O
</s>
<s>
address	B-Device
decoder	I-Device
,	O
</s>
<s>
In	O
coding	B-Error_Name
theory	I-Error_Name
,	O
a	O
balanced	B-Error_Name
code	I-Error_Name
is	O
a	O
binary	O
forward	B-Error_Name
error	I-Error_Name
correction	I-Error_Name
code	O
for	O
which	O
each	O
codeword	O
contains	O
an	O
equal	O
number	O
of	O
zero	O
and	O
one	O
bits	O
.	O
</s>
<s>
Balanced	B-Error_Name
codes	I-Error_Name
have	O
been	O
introduced	O
by	O
Donald	O
Knuth	O
;	O
they	O
are	O
a	O
subset	O
of	O
so-called	O
unordered	O
codes	O
,	O
which	O
are	O
codes	O
having	O
the	O
property	O
that	O
the	O
positions	O
of	O
ones	O
in	O
a	O
codeword	O
are	O
never	O
a	O
subset	O
of	O
the	O
positions	O
of	O
the	O
ones	O
in	O
another	O
codeword	O
.	O
</s>
<s>
Like	O
all	O
unordered	O
codes	O
,	O
balanced	B-Error_Name
codes	I-Error_Name
are	O
suitable	O
for	O
the	O
detection	O
of	O
all	O
unidirectional	B-Error_Name
errors	I-Error_Name
in	O
an	O
encoded	O
message	O
.	O
</s>
<s>
Balanced	B-Error_Name
codes	I-Error_Name
allow	O
for	O
particularly	O
efficient	O
decoding	O
,	O
which	O
can	O
be	O
carried	O
out	O
in	O
parallel	O
.	O
</s>
<s>
biphase	B-Protocol
mark	I-Protocol
code	I-Protocol
uses	O
a	O
1	O
of	O
2	O
code	O
;	O
</s>
<s>
6b/8b	B-Protocol
encoding	I-Protocol
uses	O
a	O
4	O
of	O
8	O
code	O
;	O
</s>
<s>
the	O
Hadamard	B-Error_Name
code	I-Error_Name
is	O
a	O
of	O
code	O
(	O
except	O
for	O
the	O
zero	O
codeword	O
)	O
,	O
</s>
<s>
The	O
3-wire	O
lane	O
encoding	O
used	O
in	O
MIPI	O
C-PHY	O
can	O
be	O
considered	O
a	O
generalization	O
of	O
constant-weight	B-Error_Name
code	I-Error_Name
to	O
ternary	O
--	O
each	O
wire	O
transmits	O
a	O
ternary	B-Protocol
signal	I-Protocol
,	O
and	O
at	O
any	O
one	O
instant	O
one	O
of	O
the	O
3	O
wires	O
is	O
transmitting	O
a	O
low	O
,	O
one	O
is	O
transmitting	O
a	O
middle	O
,	O
and	O
one	O
is	O
transmitting	O
a	O
high	O
signal	O
.	O
</s>
<s>
An	O
m-of-n	B-Error_Name
code	I-Error_Name
is	O
a	O
separable	O
error	B-Error_Name
detection	I-Error_Name
code	I-Error_Name
with	O
a	O
code	O
word	O
length	O
of	O
n	O
bits	O
,	O
where	O
each	O
code	O
word	O
contains	O
exactly	O
m	O
instances	O
of	O
a	O
"	O
one	O
"	O
.	O
</s>
<s>
An	O
example	O
m-of-n	B-Error_Name
code	I-Error_Name
is	O
the	O
2-of-5	O
code	O
used	O
by	O
the	O
United	O
States	O
Postal	O
Service	O
.	O
</s>
<s>
bi-quinary	B-Algorithm
coded	I-Algorithm
decimal	I-Algorithm
code	O
uses	O
a	O
2-of-7	O
code	O
,	O
</s>
