6
$\begingroup$

How can a polynomial such as $x^3 + 1$ be converted to its binary form of $1001$. Likewise, $10100001 = x^7 + x^5 + 1.$

$\endgroup$
2
  • 1
    $\begingroup$ What do you mean by "the binary form of a polynomial"? $\endgroup$ Commented Nov 2, 2018 at 16:42
  • 1
    $\begingroup$ @DavidRicherby: See en.m.wikipedia.org/wiki/Cyclic_redundancy_check . A CRC algorithm is specified by a polynomial over the field of 2 elements, and such a polynomial is conventionally represented in binary in the manner evident from the question, i.e. by treating the coefficients as binary digits. $\endgroup$
    – PJTraill
    Commented Aug 26, 2022 at 17:46

4 Answers 4

6
$\begingroup$

Just put the value of $x=10$ then

$$10^3+1=1001$$

$\endgroup$
3
  • 2
    $\begingroup$ What if polynomial is like $x^2 -x $ ? $10^2 -10 = 90 $? $\endgroup$
    – user35837
    Commented Mar 11, 2017 at 6:20
  • 1
    $\begingroup$ @user35837: you are meant to work in binary. $\endgroup$
    – PJTraill
    Commented Aug 26, 2022 at 17:48
  • 1
    $\begingroup$ @user35837: for an equivalence between polynomials and binary numbers to be defined, the polynomials must have binary coefficients (0 or 1). So -1 is excluded. $\endgroup$
    – user16034
    Commented Aug 28, 2022 at 21:23
6
$\begingroup$

The polynomial notation is a shortcut to write binary code while omitting the zeros, it's useful to crunch CRC communication checksum to verify electric signal quality with an XOR comparison operation. Then a binary code like 1 1000 0000 0000 0101 may be noted $x^{16} + x^{15} + x^2 +1$.

$\endgroup$
1
  • $\begingroup$ What is the polynomial of this? 0xC96C5795D7870F42 Could you help me? $\endgroup$
    – Arash
    Commented Nov 9, 2020 at 4:42
3
$\begingroup$

For converting polynomial to its binary form $$p(x) = x^{3} + 1$$ you have to first reduce the coefficients mod 2. This gives us $$x^{3} + 1$$ Now simply substitute $x=2\;$ and evaluate, this gives the d+1 bit number(where d is degree of the polynomial):

$$1000_2 + 0001_2 = 1001_2 = 9_{10}$$

for ex: $$p(x) = x^2-x$$ for each coefficient of p(x) take mod 2 then this gives us : $$p'(x) = x^2-x$$ Now, substitute x = 2 (since degree of polynomial is 2 then it gives us 3(=2+1) bit number) and convert each value to its binary form then evaluate it $$100_2 - 010_2 = 010_2 = 2_{10}$$

$\endgroup$
1
$\begingroup$

For this example: $x^7 + x^5 +1$

  1. Look at the degree of the polynomial. In the case of the above example it is 7.

  2. Write down all numbers from the degree of the polynomial down to 0. These will correspond to the exponents of $x$ in the polynomial. In our case:

    7 6 5 4 3 2 1 0

  3. And, finally write a 1 under each exponent for which that power of $x$ occurs in the polynomial, and 0 under the others. Like this:

    7 6 5 4 3 2 1 0

    1 0 1 0 0 0 0 1

So the result is 10100001. Basically you are replacing each power of $x$ with a 1, and replacing the powers that do not occur with a 0.

Note: The last digit stands for 1 because that is $2^0$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.