4
$\begingroup$

Ok, I know how to use long division by using regular numbers, but when comes to binary numbers I'm getting confused.

In following calculation I can see the equation solved but I don't understand where the top number came from. How to decide what bit goes on top while doing this?

PS. We are doing the XOR comparison.

enter image description here

1 Answers 1

4

It is in fact obvious from the diagram. The number on the left is the divisor, while the number at the top is the quotient, and CRC is the final remainder.

In long division, every time you successfully subtract a multiple of the divisor, that (single digit) multiplier goes in the quotient above the right hand digit of the multiple of the divisor. In binary, the multiplier is always $1$ since there is no other positive single digit.

If you cannot subtract a multiple of the divisor with a right hand digit in that place because the running remainder is too small, then you put $0$ in that place in the quotient.

  • 0
    @Jyrki Lahtonen, you are right, using this in real life situation would be trouble some. $B$ut we have learned the division method, then using a circuit and my teacher didn't explain much about of doing your way :D2012-02-28