0% found this document useful (0 votes)
3K views16 pages

Error Detection and Correction Practice Problems

The document discusses error detection and correction techniques like Hamming distance, Hamming code, CRC, and checksum. It provides examples of calculating Hamming distance between binary words, encoding a word using even parity Hamming code, generating and transmitting CRC codewords, detecting errors using CRC, and calculating a checksum to detect errors in data transmission.

Uploaded by

Majety S Lskshmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views16 pages

Error Detection and Correction Practice Problems

The document discusses error detection and correction techniques like Hamming distance, Hamming code, CRC, and checksum. It provides examples of calculating Hamming distance between binary words, encoding a word using even parity Hamming code, generating and transmitting CRC codewords, detecting errors using CRC, and calculating a checksum to detect errors in data transmission.

Uploaded by

Majety S Lskshmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Error Detection and Correction

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).

2. The Hamming distance d(10101, 11110)


10101
11110
01011 = 3 because (10101 ⊕ 11110) is 01011 (three 1s)
Even parity hamming code
• Encode a binary word 11001 into the even
parity hamming code.
• Given, number of data bits, k =5.
• To find the number of redundant bits, (that
must be even)
• Hint
Hamming Code
• if 4-bit information is to be transmitted, then
n=4. The number of redundant bits is
determined by the trial and error method.
• Solution
Hamming Code problems
• Let us assume the even parity hamming code
from the above example (111001101) is
transmitted and the received code is
(110001101). Now from the received code,
let us detect and correct the error.
CRC Problems -1
• A bit stream 1101011011 is transmitted using the
standard CRC method. The generator polynomial is
x4+x+1. What is the actual bit string transmitted?
• Solution
• The generator polynomial G(x) = x4 + x + 1 is encoded
as 10011.
• Clearly, the generator polynomial consists of 5 bits.
• So, a string of 4 zeroes is appended to the bit stream to
be transmitted.
• The resulting bit stream is 11010110110000.
CRC Problems-1

From here, CRC = 1110.


Now,
The code word to be transmitted is obtained by replacing the last 4 zeroes of
11010110110000 with the CRC.
Thus, the code word transmitted to the receiver = 11010110111110.
CRC Problems -2
• A bit stream 10011101 is transmitted using
the standard CRC method. The generator
polynomial is x3+1.
• What is the actual bit string transmitted?
• Suppose the third bit from the left is inverted
during transmission. How will receiver detect
this error?
What is the actual bit string
transmitted?
• Solution-
• Part-01:
• The generator polynomial G(x) = x3 + 1 is encoded
as 1001.
• Clearly, the generator polynomial consists of 4
bits.
• So, a string of 3 zeroes is appended to the bit
stream to be transmitted.
• The resulting bit stream is 10011101000.
What is the actual bit string transmitted?

From here, CRC = 100. Now,


The code word to be transmitted is obtained by replacing the last 3 zeroes of
10011101000 with the CRC.
Thus, the code word transmitted to the receiver = 10011101100.
Suppose the third bit from the left is
inverted during transmission. How will
receiver detect this error?
According to the question,
Third bit from the left gets inverted during
transmission.
So, the bit stream received by the receiver =
10111101100.

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)

You might also like