DigitHelm
Computer Science

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.

Instant Results100% FreeAny DeviceNo Sign-up

CRC Standard

Polynomial: 0x7
Width: 8 bits

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. 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. 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. 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. 4

    Click Compute CRC. The result appears in binary, hexadecimal, and decimal.

  5. 5

    Review the XOR division steps panel to see how the polynomial long division proceeds bit by bit.

  6. 6

    Check the verification panel: the calculator appends the CRC bytes to your data, recomputes the CRC, and confirms the syndrome equals zero.

  7. 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.

StandardPolynomial (hex)WidthApplications
CRC-80x078 bitsDVB-S2, ATM header, SMBus
CRC-16-IBM0x800516 bitsUSB, Modbus, FAT filesystem
CRC-16-CCITT0x102116 bitsBluetooth, X.25, HDLC
CRC-320x04C11DB732 bitsEthernet, ZIP, PNG, gzip
CRC-32C (Castagnoli)0x1EDC6F4132 bitsiSCSI, SCTP, Ext4
CRC-64-ECMA0x42F0E1EBA9EA369364 bitsECMA-182, XZ compression

CRC-8 Computation Trace

For the single byte 0xB3 (10110011) with CRC-8 polynomial 0x07 (00000111), the XOR division produces:

StepRegister state (binary)Action
Initial00000000CRC = 0x00
XOR byte10110011CRC βŠ•= (byte << 0)
Bit 0, MSB=101100110 βŠ• 00000111 = 01100111Shift left, XOR poly 0x07
Bit 1, MSB=011001110Shift left only
Bit 2, MSB=110011100 βŠ• 00000111 = 10011011Shift left, XOR poly
… (8 bits)…Repeat for all 8 bits
Result0x3A (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.