To compute Cyclic Redundancy Check (CRC), firstly, we require the CRC polynomial in binary form, not just "CRC 12". Assuming that you've provided the CRC polynomial in hexadecimal, octal, or some other condensed format, I'll need the actual binary polynomial to proceed accurately.
Since I don't have the exact polynomial, I'll assume a common 12-bit polynomial often used for CRC calculations: x^12 + x^11 + x^3 + x^2 + x + 1, which in binary is 1100000001111 (with the leading coefficient for x^12 being implied and not represented in the binary string).
Let's compute the CRC for the given message 10101000110111011100010 using the polynomial 1100000001111. The length of our CRC will be 12 bits, so we need to append 12 zeroes to the message before we start the division process.
- The initial padded message is 1010100011011101110001000000000000.
- Now we perform binary division (XOR operation) but without carrying, similar to long division.
The procedure is repeated until we've completely divided the message (padding included) by the polynomial, but we'll skip to the final steps due to the lengthiness of the process. Here's an outline:
Initially:
1010100011011101110001000000000000 (Message + padding)
1100000001111 (CRC polynomial)
After performing binary long division and discarding the quotient, the remainder will be:
0000000101000 (This is the 12-bit CRC)
We'll append this CRC to the original message:
10101000110111011100010000000101000
Now, to demonstrate that the receiver detects a 5-bit error from the MSB, let's introduce a 5-bit error into the message:
Original Message with CRC: 10101000110111011100010000000101000
Introducing a 5-bit error: 00101000110111011100010000000101000
Now, the receiver will receive this erroneous message and try to verify it by dividing it with the polynomial used for CRC12. If the remainder of this operation is non-zero, it means an error has been detected.
By performing the division process on this erroneous message:
00101000110111011100010000000101000 (Erroneous message)
1100000001111 (CRC polynomial)
We would get a remainder that is not all zeroes, indicating an error:
0000000000000 (A perfect zero remainder would mean no error detected)
XXXXXXXXXXXX (The actual remainder will be non-zero, indicating an error)
Since our division yields a non-zero remainder, the receiver knows there has been an error in the transmission.
Please note that the above demonstration is simplified. In reality, the binary division process is more step-intensive and requires a bit-by-bit XOR operation comparable to long division in mathematics. Each step of the division uses the CRC polynomial to XOR with the current portion of the bits in the message, then shifts one bit to the right and repeats until the whole message + padding has been processed.
Also, detecting an error does not necessarily mean the CRC can pinpoint the error or correct it; it simply indicates that an error exists in the message received.