This document discusses error control techniques used in data transmission. It covers principles of error detection and correction, including single parity, two-dimensional parity, checksum algorithms like 1's complement sum and cyclic redundancy check (CRC). Specific error detection and correction algorithms are explained through examples, including how single and double errors can be detected and corrected using two-dimensional parity and how CRC can detect burst errors up to the length of the generator polynomial.
2. Contents
Principle of error control
Detections
Corrections
Error detection algorithms
Single Parity
2 Dimensional Parity
1st compliment sum
Check sum
01/01/04 2
3. Coding and Error Control
Despite the modulation techniques used, it is possible that the
data send through a medium is corrupted, by one of the distortion
sources we discussed earlier. To recover from errors, network
protocols provide mechanisms, usually implemented at the
transport or data link layer in the ISOmodel.
Error Detections: the protocol simply detects the occurrences of
errors and requires then a retransmission using the time out or a
negative acknowledgement.
Error Correction (Forward Error Correction FEC) are complex and
costly algorithms that correct some of the errors reported in the
transmission.
Although is subject is very complex and outside the scope of this
course, we will highlight some basic principles for error detections
and corrections
01/01/04 3
5. Parity checks (1)
Single parity: This scheme is simple and inexpensive. It
can only be used for short communication, such as PC to
a printer connections. It can only detects single errors,
or an even or an odd number of errors (depending on
the type of the parity). For instance, for an even parity
check, an additional parity bit is used to report the
number of even 1s in the signal. If the number of 1s is
even the parity bit is set to 0. Obviously, an odd number
of 1s will be detected.
Two-dimensional parity: In this scheme data is
organised as a matrix and single parities are applied to
columns and rows. With this approach, some errors can
be corrected, in addition to detection.
Single errors can be detected and corrected
Double errors can be detected, but not necessarily corrected.
Triple Errors can not be necessarily detected and corrected
01/01/04 5
6. 01111011
Sender
01111011 0
Single dimensional Parity, example
01110011 0
Receiver
01110011 0 1
Single Error
Detected
01/01/04 6
10. Check-summing methods (1)
These techniques involve performing some arithmetic
operation on the m-bit message to produce the r-bit
check sum. The receiver applied the same operation on
the check sum and the original message to detect error.
1s compliment check sum (Internet Check Sum):
Mainly used in the TCP/UDP protocols for it simplicity.
Message is divided into r-fields all fields are added
together and the final sum is inverted. The same
operation is applied at the receiver, where the new
check sum is added to the received one, the result
should be all 111111111, otherwise an error has
occurred.
A A 1
The principle of the Arithmetic addition
01/01/04 10
13. Check-summing methods (2)
The most popular coding technique used in Ethernet,
MAC layer is the cyclic redundancy check code (CRC) also
known as the polynomial code. A generator code is used
to divide the message, modulo 2 division, then the
remainder of the division is used as the check sum.
The sender calculates r = m%g, using XOR operation,
where m is the message, g is the polynomial, of degree n
(the number of bits +1) and r is the reminder. It sends
(m+r).
The receiver computes (m+r)%g = 0, no errors, otherwise
errors have occurred.
The generator are specially chosen, for instance IEEE802
is a 32 bit code.
01/01/04 13
14. Check-summing methods (3)
It can be proven that the CRC scheme
1. Detect single and double errors.
2. Detect all odd number of errors.
3. Detect all burst errors <= than the number of
bits +1 in the generator, n, (IEEE802, burst less
32 are detected)
4. Furthermore, the probability that a burst error
greater than n is not detected is 2-n . For
generator of 32 bits, this probability that an
error is not detected is 2-31.
01/01/04 14
15. Example
Message m = 1101011011, Generator g = 10011 degree n=4.
r = m%g as follows.
10011 11010110110000
10011
010011
10011
0000010110
10011
0010100
10011
001110
Thus r = 1110, and the full packet will be 1101011011 1110
01/01/04 15
17. At the receiver, the remainder is
zero, there are no errors.
11010110111110
10011
010011
10011
0000010111
10011
0010011
10011
000000
At the receiver, the remainder is not
zero, there are errors.
10110100111110
10011
0010110
10011
0010101
10011
0011011
10011
010001
10011
0001010
01/01/04 17
18. Quiz
What happen when an error is detected by the
sender? Discuss two possibilities.
How many errors can be corrected with 2Dimensional
parity bits?
What is the chance of not detecting an error with a
generator of 32-bits, in checksum algorithm?
01/01/04 18