CRC Calculator | CRC-8, CRC-16 & CRC-32 Checksum with XOR Division
Compute CRC-8, CRC-16-IBM, and CRC-32 checksums for binary strings or ASCII text. Shows the full XOR polynomial long-division process step by step, the generator polynomial used, and the resulting remainder. Verifies data integrity by appending the CRC and confirming the syndrome is zero.
CRC Standard
Input Mode
Enter printable text (e.g. Hello)
What Is the CRC Calculator | CRC-8, CRC-16 & CRC-32 Checksum with XOR Division?
A Cyclic Redundancy Check computes a fixed-width checksum by performing binary polynomial long division over GF(2) (XOR arithmetic). The sender appends the r-bit remainder to the message; the receiver divides the received frame by the same polynomial and checks that the syndrome is zero. CRC can detect all single and double bit errors, all odd-parity errors, and all burst errors shorter than r bits.
Formula
CRC(M) = remainder of [M Γ x^r] Γ· G(x) in GF(2), where G(x) is the generator polynomial of degree r
How to Use
- 1
Choose the CRC standard: CRC-8 (8-bit remainder, good for short frames), CRC-16 (16-bit, USB/Modbus), or CRC-32 (32-bit, Ethernet/ZIP).
- 2
Select input mode: ASCII for printable text, Binary for bit strings (e.g. 10110011), or Hex for byte sequences (e.g. A3 B7).
- 3
Type your data in the input field. For ASCII mode you can enter any text; for Binary, enter 0s and 1s; for Hex, separate bytes with spaces.
- 4
Click Compute CRC. The result appears in binary, hexadecimal, and decimal.
- 5
Review the XOR division steps panel to see how the polynomial long division proceeds bit by bit.
- 6
Check the verification panel: the calculator appends the CRC bytes to your data, recomputes the CRC, and confirms the syndrome equals zero.
- 7
Use the preset buttons to quickly load standard test vectors and verify against known expected values.
Select CRC standard and input mode, then type your data and click Compute CRC.
Example Calculation
CRC-32 of ASCII 'abc': bytes are 0x61, 0x62, 0x63. With polynomial 0x04C11DB7, init 0xFFFFFFFF, and final XOR 0xFFFFFFFF the result is 0x352441C2. CRC-16-IBM of '123456789' gives 0xBB3D β a standard test vector used to validate CRC implementations.
Understanding CRC | CRC-8, CRC-16 & CRC-32 Checksum with XOR Division
Common CRC Standards
Different CRC polynomials are optimized for specific error-detection properties and data widths. The table below lists the most widely deployed standards.
| Standard | Polynomial (hex) | Width | Applications |
|---|---|---|---|
| CRC-8 | 0x07 | 8 bits | DVB-S2, ATM header, SMBus |
| CRC-16-IBM | 0x8005 | 16 bits | USB, Modbus, FAT filesystem |
| CRC-16-CCITT | 0x1021 | 16 bits | Bluetooth, X.25, HDLC |
| CRC-32 | 0x04C11DB7 | 32 bits | Ethernet, ZIP, PNG, gzip |
| CRC-32C (Castagnoli) | 0x1EDC6F41 | 32 bits | iSCSI, SCTP, Ext4 |
| CRC-64-ECMA | 0x42F0E1EBA9EA3693 | 64 bits | ECMA-182, XZ compression |
CRC-8 Computation Trace
For the single byte 0xB3 (10110011) with CRC-8 polynomial 0x07 (00000111), the XOR division produces:
| Step | Register state (binary) | Action |
|---|---|---|
| Initial | 00000000 | CRC = 0x00 |
| XOR byte | 10110011 | CRC β= (byte << 0) |
| Bit 0, MSB=1 | 01100110 β 00000111 = 01100111 | Shift left, XOR poly 0x07 |
| Bit 1, MSB=0 | 11001110 | Shift left only |
| Bit 2, MSB=1 | 10011100 β 00000111 = 10011011 | Shift left, XOR poly |
| β¦ (8 bits) | β¦ | Repeat for all 8 bits |
| Result | 0x3A (example) | Final CRC remainder |
CRC Applications in Practice
- βΈEthernet (IEEE 802.3): A 32-bit CRC-32 is appended to every Ethernet frame. The receiver recomputes the CRC and discards any frame where the syndrome is non-zero.
- βΈUSB protocol: CRC-5 is used for token packets and CRC-16 for data packets, providing reliable detection of single-bit errors and most burst errors.
- βΈZIP and gzip archives: CRC-32 is stored in the local file header and verified on extraction, detecting file corruption during download or storage.
- βΈPNG images: Each chunk in a PNG file carries a CRC-32 computed over the chunk type and data, allowing viewers to detect partial download corruption.
- βΈHard drive firmware: Advanced CRC variants protect sector data and ECC metadata, enabling recovery of single-symbol errors in stored data.
- βΈModbus RTU: Industrial PLC communication relies on CRC-16-IBM to verify message integrity over noisy RS-485 bus links.
Frequently Asked Questions
What is the difference between CRC-8, CRC-16, and CRC-32?
The number indicates the width in bits of the checksum (remainder). CRC-8 produces 1 byte and can detect all single-bit errors. CRC-16 produces 2 bytes, detects all single and double errors, and is used in USB and Modbus. CRC-32 produces 4 bytes, detects all bursts up to 32 bits, and is used in Ethernet, ZIP, and PNG. Longer CRCs have lower residual error probability but add more overhead.
Why does CRC-32 use initial value 0xFFFFFFFF instead of 0?
Pre-conditioning the CRC register with all 1s (0xFFFFFFFF) means that leading zero bytes in the input affect the CRC, preventing the trivial all-zeros message from always producing a zero CRC. The final XOR with 0xFFFFFFFF (post-conditioning) ensures that an all-zeros frame with an all-zeros CRC appended is rejected, because the syndrome won't be zero.
What is the 'syndrome' in CRC verification?
When the receiver appends the transmitted CRC to the data and recomputes the CRC over the combined frame, the result is called the syndrome. If no errors occurred, the syndrome equals zero. A non-zero syndrome guarantees an error was detected. Some CRC implementations produce a magic residue constant rather than zero; this calculator uses the zero-syndrome convention.
Can CRC detect all errors?
CRC cannot detect all possible errors, but it has strong guarantees: it detects all single-bit errors, all double-bit errors (for appropriate generator polynomials), all odd numbers of errors (if the polynomial has an even number of terms), and all burst errors shorter than the CRC width. It does not detect certain multi-bit patterns that happen to be multiples of the generator polynomial. For strong security, use cryptographic hashes (SHA-256); CRC is designed for accidental corruption, not tampering.
What does reflected or reversed input mean?
Many real-world CRC implementations process each byte LSB-first (bit-reversed) rather than MSB-first. This is called reflected input or reversed-bit order. CRC-32 in Ethernet uses reflected processing, which is equivalent to using the bit-reversal of the polynomial (0xEDB88320 instead of 0x04C11DB7). This calculator uses the non-reflected (MSB-first) convention for clarity in showing the XOR steps.
You Might Also Like
Explore 360+ Free Calculators
From math and science to finance and everyday life β all free, no account needed.