CRC Calculator

Compute a simple binary CRC remainder for a message and generator polynomial. This educational calculator shows the formula, result, and step-by-step interpretation.

Computer ScienceCoding Theory

Calculator

What this calculator teaches

CRC uses polynomial division over GF(2) to create a remainder that can detect many transmission errors.

Use the result as a learning aid. For classwork, still show the formula and intermediate reasoning so the final answer is not just a black-box number.

CRC as Polynomial Division over GF(2)

A cyclic redundancy check treats a bit string as coefficients of a polynomial over the two-element field GF(2). Addition and subtraction are both XOR because 1 + 1 = 0 in this arithmetic. If the generator polynomial has degree r, the sender appends r zero bits to the message, divides the resulting polynomial by the generator using XOR long division, and keeps the r-bit remainder.

The transmitted codeword is the original message followed by that remainder. In the ideal algebraic model, dividing an uncorrupted codeword by the same generator gives remainder zero. A changed codeword can produce a nonzero remainder, allowing many transmission errors to be detected. CRC is primarily an error-detection method; the remainder generally does not identify which bit changed.

StepOperationReason
Generator degreer = length(generator) − 1Determines remainder length
Augment messageM(x)xrCreates room for r check bits
Divide in GF(2)XOR instead of subtractionCoefficients are only 0 or 1
Codewordmessage || remainderPolynomial is divisible by generator

The quality of a CRC depends strongly on the chosen generator polynomial. Different generators detect different patterns of errors, so a classroom polynomial-division example should not be treated as a complete communications-standard CRC unless its bit ordering, initialization, reflection, and final-XOR conventions are also specified.

Formula & Symbols

ConceptFormula or rule
CRC remainderbinary polynomial division remainder
Codewordmessage followed by remainder

Worked example

Example: Divide the padded message by the generator bits using XOR subtraction.
Example 2: Message 1101011011 with generator 10011 has degree 4. Appending four zeros and performing XOR division gives remainder 1110, so the codeword is 11010110111110.
Example 3: The classic message 11010011101100 with generator 1011 gives remainder 100 after binary polynomial division.
Example 4: Message 1011 with generator 1101 gives remainder 100. The three-bit remainder length matches the generator degree 3.
Example 5: Using generator 11 corresponds to x + 1. For message 1010, the remainder is 0 because the message has even parity; this generator is closely related to a parity check.

Common mistakes

⚠️
Using the wrong input format

Keep lists comma separated, matrices as rows separated by semicolons, and modular inputs as integers.

⚠️
Ignoring assumptions

Some methods require positive probabilities, valid moduli, independent trials, or small educational input sizes.

⚠️
Using ordinary subtraction in the long division

CRC polynomial arithmetic is over GF(2). Subtraction has no borrowing and is performed with XOR, so 1 XOR 1 = 0 and 1 XOR 0 = 1.

⚠️
Forgetting to append zeros before division

A degree-r generator requires r trailing zeros on the message before computing the remainder. Those positions are then replaced by the r check bits.

FAQ

Can I use decimals?
Most numerical calculators allow decimals, but modular arithmetic and coding-theory tools usually require integers or binary strings.
Is this for homework checking?
Yes. The page is designed to show both the answer and the reasoning pattern.
Why does the result sometimes say approximate?
Some probability, floating-point, and numerical methods naturally produce approximations.
Why is XOR used in CRC division?
CRC coefficients belong to GF(2), where the only coefficients are 0 and 1 and arithmetic is modulo 2. Addition and subtraction are therefore identical, and bitwise XOR implements both operations without carries or borrows.
Does a zero CRC remainder prove a message has no errors?
No. A zero remainder means the received polynomial is divisible by the generator. Well-chosen CRC generators detect broad classes of errors, but some error patterns are also divisible by the generator and can pass undetected.
Can CRC correct an incorrect bit?
Ordinary CRC is designed for error detection, not general error correction. A nonzero syndrome indicates inconsistency with the generator, but it usually does not uniquely identify the location or pattern of changed bits.
Why do real CRC standards need more parameters than a generator polynomial?
Practical CRC specifications can define the initial register value, whether input or output bits are reflected, a final XOR value, and bit-order conventions. Two implementations using the same polynomial can disagree if those conventions differ.

Related calculators

These links will work after the calculators are registered in the final Math layout update.

Formula Explorer connections

Interpretation: This formula uses integer divisibility, modular arithmetic, finite fields or coding relationships. Assumption: Inputs are usually integers with specific modulus or coprimality requirements. Cryptographic examples are educational and not a substitute for vetted security libraries.

Diffie-Hellman Mathematics Calculator →Factorial Calculator →Finite Field GF(2ⁿ) Calculator →Math Formula Explorer →