Error detection/correction
(Maintaining
data
(informa.on)
integrity
across
noisy
channels
and
less-than-reliable
storage
media)
Error
detec)on
is
the
detec.on
of
errors
caused
by
noise
or
other
impairments
during
transmission
from
the
transmi:er
to
the
receiver.
Error
correc)on
is
the
detec.on
of
errors
and
reconstruc.on
of
the
original,
error-free
data.
Error
correc.on
may
generally
be
realized
in
two
dierent
ways:
1)
Automa.c
repeat
request
(ARQ)
(some.mes
also
referred
to
as
backward
error
correc.on)
2)
Forward
error
correc.on
(FEC)
Backwards and Forwards error correction
Automa)c
repeat
request
(ARQ)
(some.mes
also
referred
to
as
backward
error
correc.on):
This
is
an
error
control
technique
whereby
an
error
detec.on
scheme
is
combined
with
requests
for
retransmission
of
erroneous
data.
Every
block
of
data
received
is
checked
using
the
error
detec.on
code
used,
and
if
the
check
fails,
retransmission
of
the
data
is
requested
this
may
be
done
repeatedly,
un.l
the
data
can
be
veried.
Forward
error
correc)on
(FEC):
The
sender
encodes
the
data
using
an
error-correc.ng
code
(ECC)
prior
to
transmission.
The
addi.onal
informa.on
(redundancy)
added
by
the
code
is
used
by
the
receiver
to
recover
the
original
data.
In
general,
the
reconstructed
data
is
what
is
deemed
the
"most
likely"
original
data.
forward
error
correc.on
(FEC)
code
is
a
system
of
adding
redundant
data,
or
parity
data,
to
a
message,
such
that
it
can
be
recovered
by
a
receiver
even
when
a
number
of
errors
(up
to
the
capability
of
the
code
being
used)
were
introduced,
either
during
the
process
of
transmission,
or
on
storage.
Codes - General
A
code
that
will
detect
2t
or
fewer
errors
can
correct
t
or
fewer
errors.
A
code
will
detect
all
sets
of
t
or
fewer
errors
i
the
minimum
hamming
distance
between
code
words
is
at
least
t
+
1.
[t
+
1
=
3;
detects
2
errors]
A
code
is
capable
of
correc.ng
all
sets
of
t
or
fewer
errors
i
the
minimum
hamming
distance
between
code
words
is
at
least
2t
+
1.
[2t
+1
=
3;
corrects
1
error]
Codeword polynomial:
V(x)
=
R(x)
+
Xn-k
M(x)
where:
V(x)
=
codeword;
R(x)
=
remainder
poly.;
Xn-k
=
shiZ
bits;
M(x)
=
message
bits
Codeword generation example:
n
=
7,
k
=
3
n-k
=
4
Encode
the
message
101
as
a
(7,3)
code
with
a
generator
polynomial
of:
X4
+
X3
+
X2
+
1.
Codeword generation example:
Message = 1 0 1
M(x) = 1 + 0X + X2
Xn-k M(x) = X4 M(x) = 0 + 0X + 0X2 + 0X3 + X4 + 0X5 + X6
R(x) = 1 + X <--see next slide
V(x) = 1 + X + 0X2 + 0X3 + X4 + 0X5 + X6
Codeword= 1 1 0 0 1 0 1
Check Digits Message
R(x) calculation:
X2 + X + 1
X4
+ X3 + X2 + 0 + 1 |X6 + 0X5 + X4
X6 + X5 + X4 + 0X3 + X2
X5 + X2
X5 + X4 + X3 + X2 + X
X4 + X3 + X2 + X
X4 + X3 + X2 + 1
XOR
process
X + 1
R(x)
CRC - Cyclic redundancy check polynomials
CRC-5
=
X5
+
X4
+
X2
+
X
CRC-16
=
X16
+
X15
+
X5
+
1
CRC-32
[Used by ethernet, FDDI, ZIP, PNG and others]
C(x)
=
x31
+
x30
+
x26
+
x25
+
x24
+
x18
+
x15
+
x14
+
x12
+
x11
+
x10
+
x8
+
x6
+
x5
+
x4
+
x3
+
x
+
1
CRC - Cyclic redundancy check polynomials
Designing
CRC
polynomials
The
selec.on
of
generator
polynomial
is
the
most
important
part
of
implemen.ng
the
CRC
algorithm.
The
polynomial
must
be
chosen
to
maximize
the
error
detec.ng
capabili.es
while
minimizing
overall
collision
probabilites.
The
most
important
a:ribute
of
the
polynomial
is
its
length
(the
number
of
the
highest
nonzero
coecient),
because
of
its
direct
inuence
of
the
length
of
the
computed
checksum.
The
most
commonly
used
polynomial
lengths
are
9
bits
(CRC-8)
17
bits
(CRC-16)
33
bits
(CRC-32)
65
bits
(CRC-64)
A
polynomial
g(x)
that
admits
other
factoriza.ons
may
be
chosen
then
so
as
to
balance
the
maximal
total
blocklength
with
a
desired
error
detec.on
power.
The
BCH
codes
are
a
powerful
class
of
such
polynomials.
CRC - Cyclic redundancy check polynomials
Name Uses
CRC-1 most
hardware;
also
known
as
parity
bit
CRC-4-ITU G.704
CRC-5-EPC Gen 2 RFID[15]
CRC-5-USB USB
token
packets
CRC-7 telecom systems, G.707, G.832, MMC, SD
CRC-8-CCITT
I.432.1; ATM HEC, ISDN HEC and cell delineation
CRC-8-Maxim 1-Wire bus
CRC-8-SAE
J1850 AES3
CRC-10 ATM;
I.610
CRC-12 telecom systems
Bisync, Modbus, USB, ANSI X3.28, SIA DC-07, many others; also known
CRC-16-IBM
as CRC-16 and CRC-16-ANSI
X.25, V.41, HDLC FCS, XMODEM, Bluetooth, PACTOR, SD, many others;
CRC-16-CCITT known as CRC-CCITT
CRC-16-T10-
DIF SCSI
DIF
CRC-16-DECT
cordless
telephones[23]
CRC-17-CAN CAN
FD
CRC-21-CAN CAN
FD
CRC-24 FlexRay
CRC-24-Radix-64
OpenPGP, RTCM104v3
CRC-30 CDMA
HDLC, ANSI X3.66, ITU-T V.42, Ethernet, Serial
CRC-32 ATA, MPEG-2, PKZIP, Gzip, Bzip2, PNG,[26] many others
CRC-40-GSM
GSM control channel
CRC-64-ISO HDLC, Swiss-Prot/TrEMBL; considered weak for hashing
CRC-64-
ECMA-182
ECMA-182, XZ Utils