<s>
In	O
communications	O
and	O
information	O
processing	O
,	O
code	O
is	O
a	O
system	O
of	O
rules	O
to	O
convert	O
information	O
—	O
such	O
as	O
a	O
letter	O
,	O
word	O
,	O
sound	O
,	O
image	O
,	O
or	O
gesture	O
—	O
into	O
another	O
form	O
,	O
sometimes	O
shortened	B-General_Concept
or	O
secret	O
,	O
for	O
communication	O
through	O
a	O
communication	O
channel	O
or	O
storage	B-General_Concept
in	O
a	O
storage	B-General_Concept
medium	I-General_Concept
.	O
</s>
<s>
The	O
process	O
of	O
encoding	B-Algorithm
converts	O
information	O
from	O
a	O
source	O
into	O
symbols	O
for	O
communication	O
or	O
storage	B-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
semaphore	B-Operating_System
,	O
where	O
the	O
configuration	O
of	O
flags	O
held	O
by	O
a	O
signaler	O
or	O
the	O
arms	O
of	O
a	O
semaphore	B-Operating_System
tower	O
encodes	O
parts	O
of	O
the	O
message	O
,	O
typically	O
individual	O
letters	O
,	O
and	O
numbers	O
.	O
</s>
<s>
In	O
information	O
theory	O
and	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
code	O
is	O
usually	O
considered	O
as	O
an	O
algorithm	O
that	O
uniquely	O
represents	O
symbols	O
from	O
some	O
source	O
alphabet	O
,	O
by	O
encoded	B-Algorithm
strings	O
,	O
which	O
may	O
be	O
in	O
some	O
other	O
target	O
alphabet	O
.	O
</s>
<s>
An	O
extension	O
of	O
the	O
code	O
for	O
representing	O
sequences	O
of	O
symbols	O
over	O
the	O
source	O
alphabet	O
is	O
obtained	O
by	O
concatenating	O
the	O
encoded	B-Algorithm
strings	O
.	O
</s>
<s>
Using	O
the	O
extension	O
of	O
the	O
code	O
,	O
the	O
encoded	B-Algorithm
string	O
0011001	O
can	O
be	O
grouped	O
into	O
codewords	O
as	O
0	O
011	O
0	O
01	O
,	O
and	O
these	O
in	O
turn	O
can	O
be	O
decoded	O
to	O
the	O
sequence	O
of	O
source	O
symbols	O
acab	O
.	O
</s>
<s>
A	O
code	O
is	O
a	O
total	B-Algorithm
function	I-Algorithm
mapping	O
each	O
symbol	O
from	O
S	O
to	O
a	O
sequence	O
of	O
symbols	O
over	O
T	O
.	O
The	O
extension	O
of	O
,	O
is	O
a	O
homomorphism	O
of	O
into	O
,	O
which	O
naturally	O
maps	O
each	O
sequence	O
of	O
source	O
symbols	O
to	O
a	O
sequence	O
of	O
target	O
symbols	O
.	O
</s>
<s>
In	O
this	O
section	O
,	O
we	O
consider	O
codes	O
that	O
encode	O
each	O
source	O
(	O
clear	O
text	O
)	O
character	O
by	O
a	O
code	O
word	O
from	O
some	O
dictionary	O
,	O
and	O
concatenation	O
of	O
such	O
code	O
words	O
give	O
us	O
an	O
encoded	B-Algorithm
string	O
.	O
</s>
<s>
Variable-length	O
codes	O
are	O
especially	O
useful	O
when	O
clear	O
text	O
characters	O
have	O
different	O
probabilities	O
;	O
see	O
also	O
entropy	B-Algorithm
encoding	I-Algorithm
.	O
</s>
<s>
Huffman	B-General_Concept
coding	I-General_Concept
is	O
the	O
most	O
known	O
algorithm	O
for	O
deriving	O
prefix	O
codes	O
.	O
</s>
<s>
Prefix	O
codes	O
are	O
widely	O
referred	O
to	O
as	O
"	O
Huffman	B-General_Concept
codes	I-General_Concept
"	O
even	O
when	O
the	O
code	O
was	O
not	O
produced	O
by	O
a	O
Huffman	B-General_Concept
algorithm	I-General_Concept
.	O
</s>
<s>
Other	O
examples	O
of	O
prefix	O
codes	O
are	O
country	O
calling	O
codes	O
,	O
the	O
country	O
and	O
publisher	O
parts	O
of	O
ISBNs	B-Library
,	O
and	O
the	O
Secondary	O
Synchronization	O
Codes	O
used	O
in	O
the	O
UMTS	B-Protocol
WCDMA	O
3G	O
Wireless	O
Standard	O
.	O
</s>
<s>
Codes	O
may	O
also	O
be	O
used	O
to	O
represent	O
data	O
in	O
a	O
way	O
more	O
resistant	O
to	O
errors	O
in	O
transmission	O
or	O
storage	B-General_Concept
.	O
</s>
<s>
This	O
so-called	O
error-correcting	B-Error_Name
code	I-Error_Name
works	O
by	O
including	O
carefully	O
crafted	O
redundancy	O
with	O
the	O
stored	O
(	O
or	O
transmitted	O
)	O
data	O
.	O
</s>
<s>
Examples	O
include	O
Hamming	B-Error_Name
codes	I-Error_Name
,	O
Reed	B-Error_Name
–	I-Error_Name
Solomon	I-Error_Name
,	O
Reed	O
–	O
Muller	O
,	O
Walsh	B-Error_Name
–	I-Error_Name
Hadamard	I-Error_Name
,	O
Bose	O
–	O
Chaudhuri	O
–	O
Hochquenghem	O
,	O
Turbo	B-Error_Name
,	O
Golay	B-Error_Name
,	O
Goppa	O
,	O
low-density	B-Error_Name
parity-check	I-Error_Name
codes	I-Error_Name
,	O
and	O
space	B-Protocol
–	I-Protocol
time	I-Protocol
codes	I-Protocol
.	O
</s>
<s>
Error	B-Error_Name
detecting	I-Error_Name
codes	I-Error_Name
can	O
be	O
optimised	O
to	O
detect	O
burst	O
errors	O
,	O
or	O
random	O
errors	O
.	O
</s>
<s>
When	O
telegraph	O
messages	O
were	O
the	O
state	O
of	O
the	O
art	O
in	O
rapid	O
long-distance	O
communication	O
,	O
elaborate	O
systems	O
of	O
commercial	O
codes	O
that	O
encoded	B-Algorithm
complete	O
phrases	O
into	O
single	O
mouths	O
(	O
commonly	O
five-minute	O
groups	O
)	O
were	O
developed	O
,	O
so	O
that	O
telegraphers	O
became	O
conversant	O
with	O
such	O
"	O
words	O
"	O
as	O
BYOXO	O
(	O
"	O
Are	O
you	O
trying	O
to	O
weasel	O
out	O
of	O
our	O
deal	O
?	O
</s>
<s>
The	O
use	O
of	O
data	O
coding	O
for	O
data	B-General_Concept
compression	I-General_Concept
predates	O
the	O
computer	O
era	O
;	O
an	O
early	O
example	O
is	O
the	O
telegraph	O
Morse	O
code	O
where	O
more-frequently	O
used	O
characters	O
have	O
shorter	O
representations	O
.	O
</s>
<s>
Techniques	O
such	O
as	O
Huffman	B-General_Concept
coding	I-General_Concept
are	O
now	O
used	O
by	O
computer-based	O
algorithms	O
to	O
compress	O
large	O
data	O
files	O
into	O
a	O
more	O
compact	O
form	O
for	O
storage	B-General_Concept
or	O
transmission	O
.	O
</s>
<s>
Character	O
encodings	B-Algorithm
are	O
representations	O
of	O
textual	O
data	O
.	O
</s>
<s>
A	O
given	O
character	O
encoding	B-Algorithm
may	O
be	O
associated	O
with	O
a	O
specific	O
character	O
set	O
(	O
the	O
collection	O
of	O
characters	O
which	O
it	O
can	O
represent	O
)	O
,	O
though	O
some	O
character	O
sets	O
have	O
multiple	O
character	O
encodings	B-Algorithm
and	O
vice	O
versa	O
.	O
</s>
<s>
Character	O
encodings	B-Algorithm
may	O
be	O
broadly	O
grouped	O
according	O
to	O
the	O
number	O
of	O
bytes	O
required	O
to	O
represent	O
a	O
single	O
character	O
:	O
there	O
are	O
single-byte	O
encodings	B-Algorithm
,	O
multibyte	B-Language
(	O
also	O
called	O
wide	O
)	O
encodings	B-Algorithm
,	O
and	O
variable-width	O
(	O
also	O
called	O
variable-length	O
)	O
encodings	B-Algorithm
.	O
</s>
<s>
The	O
earliest	O
character	O
encodings	B-Algorithm
were	O
single-byte	O
,	O
the	O
best-known	O
example	O
of	O
which	O
is	O
ASCII	B-Protocol
.	O
</s>
<s>
ASCII	B-Protocol
remains	O
in	O
use	O
today	O
,	O
for	O
example	O
in	O
HTTP	B-Protocol
headers	I-Protocol
.	O
</s>
<s>
However	O
,	O
single-byte	O
encodings	B-Algorithm
cannot	O
model	O
character	O
sets	O
with	O
more	O
than	O
256	O
characters	O
.	O
</s>
<s>
Scripts	O
that	O
require	O
large	O
character	O
sets	O
such	O
as	O
Chinese	O
,	O
Japanese	O
and	O
Korean	O
must	O
be	O
represented	O
with	O
multibyte	B-Language
encodings	B-Algorithm
.	O
</s>
<s>
Early	O
multibyte	B-Language
encodings	B-Algorithm
were	O
fixed-length	O
,	O
meaning	O
that	O
although	O
each	O
character	O
was	O
represented	O
by	O
more	O
than	O
one	O
byte	O
,	O
all	O
characters	O
used	O
the	O
same	O
number	O
of	O
bytes	O
(	O
"	O
word	O
length	O
"	O
)	O
,	O
making	O
them	O
suitable	O
for	O
decoding	O
with	O
a	O
lookup	O
table	O
.	O
</s>
<s>
The	O
final	O
group	O
,	O
variable-width	O
encodings	B-Algorithm
,	O
is	O
a	O
subset	O
of	O
multibyte	B-Language
encodings	B-Algorithm
.	O
</s>
<s>
These	O
use	O
more	O
complex	O
encoding	B-Algorithm
and	O
decoding	O
logic	O
to	O
efficiently	O
represent	O
large	O
character	O
sets	O
while	O
keeping	O
the	O
representations	O
of	O
more	O
commonly	O
used	O
characters	O
shorter	O
or	O
maintaining	O
backward	O
compatibility	O
properties	O
.	O
</s>
<s>
This	O
group	O
includes	O
UTF-8	O
,	O
an	O
encoding	B-Algorithm
of	O
the	O
Unicode	O
character	O
set	O
;	O
UTF-8	O
is	O
the	O
most	O
common	O
encoding	B-Algorithm
of	O
text	O
media	O
on	O
the	O
Internet	O
.	O
</s>
<s>
In	O
mathematics	O
,	O
a	O
Gödel	B-Language
code	O
was	O
the	O
basis	O
for	O
the	O
proof	O
of	O
Gödel	B-Language
's	O
incompleteness	O
theorem	O
.	O
</s>
<s>
Here	O
,	O
the	O
idea	O
was	O
to	O
map	O
mathematical	O
notation	O
to	O
a	O
natural	O
number	O
(	O
using	O
a	O
Gödel	B-Language
numbering	O
)	O
.	O
</s>
<s>
In	O
the	O
history	O
of	O
cryptography	O
,	O
codes	O
were	O
once	O
common	O
for	O
ensuring	O
the	O
confidentiality	O
of	O
communications	O
,	O
although	O
ciphers	B-Application
are	O
now	O
used	O
instead	O
.	O
</s>
<s>
to	O
trivial	O
(	O
romance	O
,	O
games	O
)	O
can	O
be	O
any	O
kind	O
of	O
imaginative	O
encoding	B-Algorithm
:	O
flowers	O
,	O
game	O
cards	O
,	O
clothes	O
,	O
fans	O
,	O
hats	O
,	O
melodies	O
,	O
birds	O
,	O
etc.	O
,	O
in	O
which	O
the	O
sole	O
requirement	O
is	O
the	O
pre-agreement	O
on	O
the	O
meaning	O
by	O
both	O
the	O
sender	O
and	O
the	O
receiver	O
.	O
</s>
<s>
Other	O
examples	O
of	O
encoding	B-Algorithm
include	O
:	O
</s>
<s>
Encoding	B-Algorithm
(	O
in	O
cognition	O
)	O
-	O
a	O
basic	O
perceptual	O
process	O
of	O
interpreting	O
incoming	O
stimuli	O
;	O
technically	O
speaking	O
,	O
it	O
is	O
a	O
complex	O
,	O
multi-stage	O
process	O
of	O
converting	O
relatively	O
objective	O
sensory	O
input	O
(	O
e.g.	O
,	O
light	O
,	O
sound	O
)	O
into	O
a	O
subjectively	O
meaningful	O
experience	O
.	O
</s>
<s>
A	O
content	O
format	O
-	O
a	O
specific	O
encoding	B-Algorithm
format	O
for	O
converting	O
a	O
specific	O
type	O
of	O
data	O
to	O
information	O
.	O
</s>
<s>
Text	O
encoding	B-Algorithm
uses	O
a	O
markup	O
language	O
to	O
tag	O
the	O
structure	O
and	O
other	O
features	O
of	O
a	O
text	O
to	O
facilitate	O
processing	O
by	O
computers	O
.	O
</s>
<s>
(	O
See	O
also	O
Text	B-Language
Encoding	I-Language
Initiative	I-Language
.	O
)	O
</s>
<s>
Semantics	O
encoding	B-Algorithm
of	O
formal	O
language	O
A	O
informal	O
language	O
B	O
is	O
a	O
method	O
of	O
representing	O
all	O
terms	O
(	O
e.g.	O
</s>
<s>
Data	B-General_Concept
compression	I-General_Concept
transforms	O
a	O
signal	O
into	O
a	O
code	O
optimized	O
for	O
transmission	O
or	O
storage	B-General_Concept
,	O
generally	O
done	O
with	O
a	O
codec	B-General_Concept
.	O
</s>
<s>
Neural	O
encoding	B-Algorithm
-	O
the	O
way	O
in	O
which	O
information	O
is	O
represented	O
in	O
neurons	O
.	O
</s>
<s>
Memory	O
encoding	B-Algorithm
-	O
the	O
process	O
of	O
converting	O
sensations	O
into	O
memories	O
.	O
</s>
