Binary Polynomial Division
Binary Polynomial Division
Table of Contents
1 Principles of Binary Arithmetic .................................................................................. 1
2 Principles of binary polynomials ................................................................................ 2
3 Division of Binary Polynomials.................................................................................. 2
3.1 The Fundamental Definition of Division............................................................ 2
3.2 Division of Polynomials in General.................................................................... 2
3.3 Division of Polynomials in Binary Arithmetic ................................................... 3
Page 1 of 5
EE521 Analog and Digital Communications April 20, 2006
If the order K of the numerator polynomial is less than the order N of the denominator
polynomial, then the quotient is zero and the remainder is the numerator polynomial; this
Page 2 of 5
EE521 Analog and Digital Communications April 20, 2006
is a trivial case so we assume here that the order of the numerator exceeds that of the
denominator.
We can define a step that produces a form similar to that of (3.2) and leaves us with a
division operation in which the order of the numerator is reduced. We multiply the
denominator by ( nK d N ) ⋅ x K − N and subtract this product from the numerator:
⎛⎛ n ⎞ K −N ⎞
n1 ( x ) = n ( x ) − ⎜⎜ ⎜ K ⎟⋅ x ⎟⎟ ⋅ d ( x )
⎝ ⎝ dN ⎠ ⎠ (3.4)
⎛ n ⎞
= ⎜ nN −1 − K ⋅ d N −1 ⎟ ⋅ x N −1 + …
⎝ dN ⎠
Now, we note that
⎛⎛ n ⎞ K −N ⎞
n ( x ) = d ( x ) ⋅ ⎜⎜ ⎜ K ⎟⋅ x ⎟⎟ + n1 ( x ) (3.5)
⎝ ⎝ dN ⎠ ⎠
which is of the same form as (3.2). We have identified the highest-order term of q(x) and
reduced the order of the numerator. If the order of n1(x) is less than that of d(x), we are
done, otherwise we repeat the operation with n1(x) as the numerator.
We pose operation as a recursion. To initialize, we set
n0 ( x ) = n ( x )
(3.6)
q0 ( x ) = 0
Each step reduces the order of the numerator and adds a term to the quotient:
⎛⎛ n ⎞ ⎞
ni +1 ( x ) = ni ( x ) − ⎜⎜ ⎜ i , K −i ⎟ ⋅ x K − N −i ⎟⎟ ⋅ d ( x )
⎝ ⎝ dN ⎠ ⎠ (3.7)
⎛n ⎞
qi +1 ( x ) = qi ( x ) + ⎜ i , K −i ⎟ ⋅ x K − N −i
⎝ dN ⎠
The recursion stops when the order of ni(x) is less than that of the denominator; the
remainder is this polynomial.
Page 3 of 5
EE521 Analog and Digital Communications April 20, 2006
If the bit ni,K-i is zero, we do NOT perform (3.8) and simply go to the next i. Note that the
polynomial coefficients are taken modulo 2 after addition in (3.8).
Quotient 0 1 0 1 1 1 1
Remainder 1 1 1 1 1 0 0 0 0 0
Note that the columns headers are the powers of x in the polynomials. The original
numerator polynomial is bordered by a double line, and the denominator polynomial is
bordered by a single line.
In the table of values headed by Division Process, we begin with the numerator. This
is equivalent to the initialization given as (3.6). We then multiply the denominator by xN-
K
(in this example, N is 16 and K is 10, so we multiply by x6. This shifts the bits of the
denominator so that the most significant bit falls below the most significant bit of the
numerator.
The most significant bit of the numerator now determines whether or not we execute
(3.8) at this iteration. This bit is copied to the column labeled Yes/No and also to the
most significant bit of the Quotient, the x6 term, near the bottom of the sheet.
At each iteration, the denominator is added to xK-N-i using binary arithmetic. If the most
significant bit of the denominator as carried to the Yes/No column is zero, as is the case
Page 4 of 5
EE521 Analog and Digital Communications April 20, 2006
in two of the rows of the example, the corresponding entries for the bits of the
denominator are made zero by multiplying them by this bit.
When you are done, you might check your work by executing (3.2) in binary arithmetic.
Page 5 of 5