To compute the CRC and demonstrate that the receiver detects a 5-bit error from the MSB, we will follow these steps:
Given:
Message: 10101000110111011100010
CRC 12 polynomial divisor
Step 1: Add 12 zeros to the end of the message
- Message after appending 12 zeros: 101010001101110111000100000000000000
Step 2: Perform CRC Division
- Perform a polynomial division using CRC 12 polynomial divisor. The divisor is 1100000001111.
Code:
101010001101110111000100000000000000 / 1100000001111
- Perform the division step by step:
Code:
1. Take the first 12 bits of the message: 101010001101
2. Perform XOR operation with the divisor: 101010001101 XOR 1100000001111 = 011100101010
3. Shift the result to the right by 1 bit: 011100101010 becomes 0011100101010
4. Repeat steps 2 and 3 until all bits of the message are processed.
5. The final remainder after dividing the message is the CRC.
Step 3: Calculate the CRC
- After performing the division, the CRC obtained is: 0110111001001
Step 4: Inject 5-bit error from MSB
- To demonstrate that the receiver detects a 5-bit error from the Most Significant Bit (MSB), invert the first 5 bits of the transmitted message.
Transmitted Message with Error:
10101000110111011100010 -> 01010100110111011100010
Step 5: Perform CRC Check at the Receiver
- At the receiver, perform the CRC division with the received message (with error) and the CRC 12 polynomial divisor.
Code:
Received message: 01010100110111011100010
CRC 12 polynomial divisor: 1100000001111
- Perform the CRC division as done before to calculate the remainder.
Step 6: Conclusion
- If the remainder obtained after dividing the received message matches the CRC calculated earlier, there is no error. However, if the remainder is different, it indicates an error in the received message. In this case, since we injected a 5-bit error from the MSB, the receiver will detect the error.