CRC (10-bit sequence): Compute the checksum for 1010011110 with divisor 1011
A cyclic redundancy check (CRC ) appends a redundancy (CRC remainder ) to the original data so that the resulting bit string is divisible by the generator (generator polynomial). For a binary divisor of length , the CRC remainder has length bits, because the generator degree is .
Given:
- Data (10 bits):
- Divisor/Generator (length 4):
- Divisor length remainder length bits
So we:
- Append zeros to the data.
- Perform modulo-2 long division by .
- Use the final remainder as the CRC.
- “Check your answer” by verifying that data + CRC is divisible by under modulo-2 division.
Mermaid view of the workflow:
CRC calculation (generator polynomial / modulo-2 division) walkthrough
Compute CRC via modulo-2 long division
- 1Step 1
Divisor is 1011 with length , so CRC remainder length is bits.
- 2Step 2
Append zeros to to form: (13 bits).
- 3Step 3
Divide by using XOR subtraction (no carries). At each step, align under the leftmost 1 of the current dividend segment.
- 4Step 4
Each XOR with flips bits wherever the divisor has 1s. The next dividend bit after each XOR is brought down to continue the process.
- 5Step 5
After completing division, the last 3 bits left over are the CRC.
- 6Step 6
Codeword = data + CRC = concatenated with the 3-bit remainder.
- 7Step 7
Verify that the full codeword divides evenly by (remainder should be ).
Full modulo-2 long division (table form)
We divide the 13-bit augmented message: by .
Key rule: modulo-2 “subtraction” is XOR.
I’ll show the division in compact form by writing the dividend window and the XOR result progression.
Start with:
- Dividend:
- Divisor:
We repeatedly XOR the divisor with the leftmost aligned 4-bit block when the leading bit is 1.
After the complete modulo-2 long division, the final 3-bit remainder is:
Therefore:
- Data:
- CRC (3 bits):
- Codeword:
CRC remainder length rule
If the divisor has bits, then CRC has bits because the generator polynomial degree is .
Modulo-2 division uses XOR, not arithmetic subtraction
When you “subtract” the divisor in CRC long division, use bitwise XOR: , , , (no borrows/carries).
CRC workflow for this specific problem
Zeros appended
1(append 3 zeros)"
Modulo-2 division
2Divide by using XOR long division"
Remainder (CRC)
3Remainder = "
Codeword formed
4Codeword = "
Check
5Re-divide; remainder should be "
Check your answer (divisibility test)
Take the transmitted codeword: and divide by the same divisor in modulo-2 arithmetic.
Because we constructed the codeword as: where CRC is exactly the remainder from dividing by , the remainder of dividing the entire codeword by must be:
So the check passes.
Final answer:
- CRC =
- Codeword =
- Re-check remainder =
Knowledge Check
The divisor is 1011 (length 4). How many CRC remainder bits do you append?