to transfer data in network from one device to another with acceptable accuracy, so the system must guarantee the transmitted data should be identical to received data.
there should be no errors if any error occurs in how many ways it can be detected and corrected
2. Table of content
Introduction
Types of Errors
Detection vs correction
Error detection scheme
Error correction
Hamming distance
Linear block codes
Cyclic codes
Polynomials
Checksum
CRC
One’s Complement
References
3. Introduction
• Network must be able to transfer data from one device to another
with acceptable accuracy, so the system must guarantee the
transmitted data should be identical to received data.
• The data can be corrupted when transmitted from one hope to next
which can be detected by some applications.
• Data can be corrupted during transmission there are few
application that require to be error detected and corrected.
4. Types of Errors
• Whenever data is transmitted that subject to be unpredictable that causes
change in shape of signals, here we have discussed two types of errors
i. Single error: in single error only one bit of given data unit is changed
which either be from 0 to 1 or from 1 to 0
ii. Burst error: it means there are more than 2 data unit changed from 1 to 0
or 0 to 1
6. • Burst error: the duration of noise is
normally longer than the duration of
1 bit which means that noise affects
data.
• The number of bits affected depends
on the data rate and duration for
noise.
Single bit error: single bit errors are
least likely type or error because their
duration or noise is normally longer
than duration of 1 bit.
Single type of errors are the least likely
type of error in serial data
transmission.
7. Detection Vs Correction
o The correction of errors is more difficult than the detection.
o In error detection we only see if any error is occurred. The answer will be yes/no.
o In error correction, we need to know the exact number corrupted bits with their
location in the message.
o For single error we need 8-bit data unit whereas for 2 errors we need to consider
28 possibilities, so for a long size messages it is difficult to find more than 10
errors in a data unit of 1000 bits.
8. Error detection scheme
• Some popular techniques of error detection are:
1. Simple parity check
2. Two dimensional parity check
3. Checksum
4. Cyclic redundancy check
9. Simple parity check
• It is the simplest technique for detecting
and correcting errors.
• The parity of 8-bits transmitted word can
be either even parity or odd parity
• Even parity: it means that the number of
1’s should be even (2,4,6).
• Odd parity: it means that the number of
1’s should be odd (1.3.5).
10. Two dimensional parity check
• In simple parity check bits are
calculated for each row. Parity
check bits are also calculated for
al columns, then both are sent
along with data.
• At the receiving end these are
compared with the parity bits
calculated on the received data.
11. Checksum
• For error detection by checksum data is divided into fixed size frames or
segments
• Sender’s End: The sender adds the segment using 1’s complement arithmetic to
get the sum. Then the sum is also complemented to get the checksum and send
it along with data frames.
• Receiver’s End: at the receiver side perform same as sender add the incoming
segments using 1’s complement to get the sum and then complements it.
• After this if result is zero the received frames are accepted, otherwise they are
discarded
13. Cyclic redundancy check
• It is method of detecting errors in the
communication channel
• This is the most widely used in real life
applications.
• It can detect all odd errors, CRC uses
generator polynomial which is available
in both sender and receiver side
• An example generator polynomial is of
the form like x3 + x + 1. This generator
polynomial represents key 1011
14. Error Correction
• As already discussed that error detection is more difficult than error
detection, it involves the sufficient redundant data to the information being
sent to enable the receiver to both detect and correct errors.
• Error-correction codes can be divided into block codes and convolution
codes. Block codes work on blocks of data of a fixed-size (e.g. packets).
Convolutional codes work for bit streams of arbitrary length. They tend to
be more complex and more difficult to implement than block codes,
• Block codes are calculated for each individual frame or packet
independently of one-another, whereas convolutional codes encode the
entire data stream for a message as one long code word, and then transmit
the message in segments.
15. Hamming distance
• The hamming distance between two words (of the same size) is the number of
differences between the corresponding bits.
• It can be easily found if we apply XOR operation on the two words and count the
number of Is in the result.
• Minimum Hamming Distance:
• it is the smallest hamming distance between all possible pairs in a set of words.
16. Example
• Let us find the Hamming distance between two pairs of words.
1. The Hamming distance d(OOO, 011)
• The hamming distance is 2
•
2. The Hamming distance d(10101, 11110)
• The hamming distance is 3
000
011
011
10101
11110
01011
17. Minimum Hamming distance
• Example 10.6
Find the minimum Hamming distance of the coding scheme
Solution
We first find all the Hamming distances.
• We apply XOR GATE
d(00000, 01011) = 3 d(00000, 10101) =3
d(0l011, 11110) = 3 d(00000, 11110) = 4
d(10101, 11110) =3 d(01011, 10101) =4
The dmin in this case is 3
18. • To guarantee the detection of
up to s errors in all cases the
minimum hamming distance
in a block code must be
dmin= s+1.
• To guarantee the correction
of up to t errors in all cases,
the minimum hamming
distance in a block code
dmin = 2t+1.
• A code scheme has a Hamming distance dmin = 4. What is
the error detection and correction capability of this scheme?
Sol. For the detection of errors:
dmin= s+1
4=s+1
S=3, so it detect upto three errors
For the correction of errors
dmin = 2t+1
4=2t+1
t=1, it can correct upto one errors
19. Linear block codes
• In the linear block codes, the parity bits and message bits have a linear
combination, which means that the resultant code word is the linear combination
of any two code words
• CYCLIC CODES: Cyclic codes are used for error correction. They are mainly
used to correct double errors and burst errors.
• The cyclic property of code words is that any cyclic-shift of a code word is also a
code word. Cyclic codes follow this cyclic property.
20. References
• Digital communication and networking by behroz frouzan 4th edition.
• Data and computer communications by William stalling 4th edition