Hello
I hope someone can help me with this.
Let's say I want to divide x^2 + x + 1 into x^2 + 1
Am I right in thinking the answer is 1 remainder x?
This is how I am getting my answer...
I convert my polynomials into binary -
x^2 + x + 1 = 111
x^2 + 1 = 101
Then I do long division -
Code:
1
111 / 101
111
----
010
Which translates as 1 remainder x.
Am I correct?
If so, how would I handle x^4 + 1 into x^2 + 1?
Convert to binary -
10001 / 101
Am I right in thinking the answer is -
Code:
0
10001 / 101
000
----
101
So the answer is 0 remainder x^2 + 1?
Thank you.