Error Detection and Correction Practice Problems
Error Detection and Correction Practice Problems
Practice Problems
Hamming distance
• Find the Hamming distance between two pairs of
words.
• 1. The Hamming distance d(000, 011)
000
011
011 = 2 because (000 ⊕ 011) is 011 (two 1s).
Now,
Receiver receives the bit stream = 10111101100.
Receiver performs the binary division with the same
generator polynomial as-
Suppose the third bit from the left is inverted during
transmission. How will receiver detect this error?
From here,
The remainder obtained on division is a non-zero value.
This indicates to the receiver that an error occurred in the data during the transmission.
Therefore, receiver rejects the data and asks the sender for retransmission.
Consider the data unit to be transmitted is-
10011001111000100010010010000100
Consider 8 bit checksum is used
Step-01:
At sender side,
The given data unit is divided into segments of 8 bits as-
Now, all the segments are added and the result is obtained as-
10011001 + 11100010 + 00100100 + 10000100 = 1000100011
Since the result consists of 10 bits, so extra 2 bits are wrapped
around.
00100011 + 10 = 00100101 (8 bits)
Now, 1’s complement is taken which is 11011010.
Thus, checksum value = 11011010
Consider the data unit to be transmitted is-
10011001111000100010010010000100
Consider 8 bit checksum is used
Step-02:
The data along with the checksum value is transmitted to the receiver.
Step-03:
At receiver side,
The received data unit is divided into segments of 8 bits.
All the segments along with the checksum value are added.
Sum of all segments + Checksum value = 00100101 + 11011010 = 11111111
Complemented value = 00000000
Since the result is 0, receiver assumes no error occurred in the data and
therefore accepts it.
Error Correction and Detection
Problems
1) Given the dataword 101001111 and the divisor
10111, show the generation of the CRC
codeword at the sender side
2) A bit stream 10011101 is transmitted using the
standard CRC method. The generator polynomial
is x3+1.
(i) What is the actual bit string transmitted?
(ii) Suppose the third bit from the left is inverted
during transmission. How will receiver detect this
error?
Error Correction and Detection
Problems
3) This problem shows a special case in checksum
handling. A sender has two data items to send:
(4567)16 and (BA98)16. What is the value of the
checksum?
4) Apply the following operations on the
corresponding polynomials:
a. (x3 + x2 + x + 1) + (x4 + x2 + x + 1)
b. (x3 + x2 + x + 1) − (x4 + x2 + x + 1)
c. (x3 + x2) × (x4 + x2 + x + 1)
d. (x3 + x2 + x + 1) / (x2 + 1)