Represent the data bits, most significant first, by a polynomial whose polynomial coefficients lie in the field with two elements . Here addition and subtraction are both exclusive or, with no carries. Choose a fixed CRC generator polynomial of polynomial degree , with leading and constant polynomial coefficients one. Both endpoints know and the bit ordering.
Multiply by , which appends zero bits. Use polynomial division to obtainReplace the appended zeros by the bits of the polynomial remainder , retaining leading zeros when necessary. The transmitted polynomial isThe last equality holds because adding cancels the existing polynomial remainder in the field with two elements. It is the simple systematic cyclic redundancy check convention used here; practical variants can add agreed initialization and final transformations.
The receiver divides the entire received polynomial by . A nonzero polynomial remainder detects corruption. If the received word is , where the ones in the error polynomial mark flipped bits, its polynomial remainder is . Thus the undetected nonzero errors are exactly the multiples of ; a zero result does not prove that transmission was error-free. Operationally, polynomial long division repeatedly cancels a leading one using a shifted copy of , implemented with exclusive or operations.
Let and . Applying polynomial long division gives the euclidean algorithmThus their polynomial greatest common divisor is , up to a nonzero constant factor. Their unique common root of a polynomial is therefore
For the separate polynomial long division, successively cancel the leading powers of the dividend. Subtracting leaves ; subtracting leaves ; subtracting leaves . ThusThe polynomial remainder also equals the dividend evaluated at .
Require a nonzero divisor. Polynomial long division repeatedly subtracts the multiple of that cancels the leading term of the current polynomial remainder. Use fresh arrays for both outputs.The loop invariant is the polynomial identity . Setting and replaces by and by , preserving this identity. The leading coefficient of that difference is exactly zero, so setting its stored value to zero and decreasing
PROCEDURE DivMod(VAR div, mod: Poly; a, b: Poly);
VAR q, r: Poly; cap, i, j, k, old: INTEGER; t: REAL;
BEGIN
ASSERT(b.degree >= 0);
cap := a.degree+1; IF cap < 1 THEN cap := 1 END;
r.degree := a.degree; NEW(r.coeff, cap);
r.coeff[0] := 0.0;
FOR i := 0 TO a.degree DO r.coeff[i] := a.coeff[i] END;
IF a.degree < b.degree THEN
Zero(q)
ELSE
q.degree := a.degree-b.degree;
NEW(q.coeff, q.degree+1);
FOR i := 0 TO q.degree DO q.coeff[i] := 0.0 END;
WHILE r.degree >= b.degree DO
old := r.degree; k := old-b.degree;
t := r.coeff[old]/b.coeff[b.degree];
q.coeff[k] := q.coeff[k]+t;
FOR j := 0 TO b.degree-1 DO
r.coeff[k+j] := r.coeff[k+j]-t*b.coeff[j]
END;
r.coeff[old] := 0.0;
DEC(r.degree); Normalize(r)
END;
Normalize(q)
END;
div := q; mod := r
END DivMod;degree implements its exact cancellation. Each iteration strictly decreases the degree of the polynomial remainder.At termination,The zero polynomial dividend, a lower-degree dividend, and a constant divisor are all covered. Division by the zero polynomial is undefined. The two output record variables must be distinct and separate from the input record variables; no input coefficient array is written. For , the work is .
Polynomial division Created 2026-09-24 Updated 2026-10-18
Polynomial division separates a polynomial into a multiple of a chosen divisor and a smaller polynomial remainder. Given over a field , with , there are unique polynomials satisfyingHere is the polynomial quotient. The bound concerns polynomial degree, rather than the sizes of the coefficients.[ref]
Fields and Galois Theory by James S. Milne. Fields and Galois Theory, version 5.10, Chapter 1, p. 10, §1.6: division algorithm, zero remainder alternative and uniqueness
For an original example over the rational numbers, takePolynomial long division first cancels by subtracting :Subtracting one more copy of cancels :ThusThe final polynomial remainder has polynomial degree one, below the divisor's polynomial degree two. Multiplying out the last identity checks every coefficient, including the constant term .
The polynomial degree bound makes this decomposition useful: it replaces a potentially long polynomial with a short polynomial remainder whenever multiples of can be discarded. At any root of a polynomial of , those multiples vanish under polynomial evaluation. Repeated polynomial division also drives the Euclidean algorithm for finding a greatest common divisor of polynomials.
The coefficient setting matters. Over a commutative ring, the same existence and uniqueness hold when the divisor's leading coefficient is a unit in a ring. A monic polynomial therefore works over the integers, even though they do not form a field; monic polynomial division over a ring explains why zero divisors cause no difficulty in that case.[ref]
Chapter 3 Ring theory. Abstract Algebra, Chapter 3 Ring theory, §3.9, Theorem 3.9.1: division with a unit leading coefficient
A nonzero divisor alone is insufficient over the integers. Dividing by with an integer polynomial quotient and a constant polynomial remainder would require for an integer , which is impossible. Over the rational numbers the division instead givesThe obstruction is the nonunit leading coefficient . This example separates existence from uniqueness: over an integral domain, the polynomial degree argument still makes any admissible pair unique, if it exists.
