a) Compute the CRC for the following message M = 1110 1010 1110 0100 0101 using the generator x4+x2+x+1. Show your detailed work. Let us call M’ the message M after appending the CRC to it. b) Suppose the following error message E = 1111 0000 1110 0000 1010 0000 is XORed to M’ obtained in part a. Is the error detected at the receiver? Show your detailed work.
- a) Compute the CRC for the following message M = 1110 1010 1110 0100 0101 using the generator x4+x2+x+1. Show your detailed work.
Let us call M’ the message M after appending the CRC to it.
- b) Suppose the following error message E = 1111 0000 1110 0000 1010 0000 is XORed to M’ obtained in part a. Is the error detected at the receiver? Show your detailed work.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps
Dear Writer This is my solution could you please take a look and double check if my solution is correct? If not could you please corret it and with explanation?
Thank you in advance.
a)
Here's a step-by-step explanation to calculate the CRC for the given message M = 1110 1010 1110 0100 0101 using the generator polynomial:
Append zeros to the message M, equal to the degree of the generator polynomial minus 1, which is 1 in this case:
M = 1110 1010 1110 0100 0101 00
Initialize the CRC register with zeros, equal to the degree of the generator polynomial:
CRC Register: 00
XOR the first 2 bits of the message M with the CRC register:
CRC Register: 00 XOR 11 = 11
Shift the CRC register one bit to the left:
CRC Register: 110
Repeat steps 3 and 4 for each bit in the message M, from left to right:
CRC Register: 110 XOR 10 = 100
CRC Register: 100 XOR 11 = 011
CRC Register: 011 XOR 01 = 010
CRC Register: 010 XOR 00 = 010
CRC Register: 010 XOR 10 = 000
CRC Register: 000 XOR 10 = 010
CRC Register: 010 XOR 00 = 010
After processing all the bits in the message M, the CRC register contains the CRC value, which is 0100.
Append the CRC value to the original message M to obtain the new message M':
M' = 1110 1010 1110 0100 0101 0100
So, the correct CRC for the given message M using the generator polynomial is 0100.
b)
To check if the error in the message E = 1111 0000 1110 0000 1010 0000 can be detected at the receiver after XORing with the message M' obtained in part a, we need to perform the CRC calculation on the combined message (M' XOR E) and see if the CRC value is zero.
XOR the message M' obtained in part a with the error message E:
M' = 1110 1010 1110 0100 0101 0100
E = 1111 0000 1110 0000 1010 0000
M' XOR E = 0001 1010 0000 0100 1111 0100
Initialize the CRC register with zeros, equal to the degree of the generator polynomial:
CRC Register: 00
XOR the first 2 bits of the (M' XOR E) with the CRC register:
CRC Register: 00 XOR 00 = 00
Shift the CRC register one bit to the left:
CRC Register: 000
Repeat steps 3 and 4 for each bit in the (M' XOR E), from left to right:
CRC Register: 000 XOR 01 = 01
CRC Register: 010 XOR 10 = 10
CRC Register: 100 XOR 00 = 00
CRC Register: 000 XOR 00 = 00
CRC Register: 000 XOR 11 = 11
CRC Register: 110 XOR 10 = 00
CRC Register: 000 XOR 10 = 10
After processing all the bits in the (M' XOR E), the CRC register contains the CRC value, which is 10.
Since the CRC value is not equal to zero, it means that an error has been detected in the combined message (M' XOR E). This indicates that the error in the message E = 1111 0000 1110 0000 1010 0000 can be detected at the receiver after XORing with the message M' obtained in part a.
Therefore, the error can be detected at the receiver.