Binary division

Thread Starter

asilvester635

Joined Jan 26, 2017
73
One example is from a textbook. It performs a binary division, though I think they made a mistake in their calculations? Also, another one is a solution that I tried working out, but I also think they made a mistake. The answer that I think is wrong is highlighted in yellow. I worked out the subtraction by getting the 2's complementary. I'm pretty sure I did the 2's complementary right.

Binary division problem from the textbook
BD1.jpg

Another binary division problem and its solution
BD2.jpg
 

MrChips

Joined Oct 2, 2009
34,829
In the first example, your analysis is correct.

In the second example, 1000 is not divisible by 1001. Hence the quotient is 0.
 

WBahn

Joined Mar 31, 2012
32,883
It's easy enough to check if the results are correct or not. Do the math.

Assuming that both G and D (in the first image) are unsigned integers, then what values to G and D represent?

If you divide G by D what do you get for the integer quotient and the remainder?

Having said that, it looks like they are mixing up the notions of doing integer division and fixed-point division.

In the first image G = 9 and D = 46. 46 / 9 = 5 r 1

But are you sure that this is binary division and not polynomial division? There is a significant difference. The mere fact that they are using the terms 'G' and 'D' imply that this is polynomial division. That is also consistent with how they are adding the additional 0 bits (is the same as multiplying D by x^3 before dividing by G).
 

Thread Starter

asilvester635

Joined Jan 26, 2017
73
It's easy enough to check if the results are correct or not. Do the math.

Assuming that both G and D (in the first image) are unsigned integers, then what values to G and D represent?

If you divide G by D what do you get for the integer quotient and the remainder?

Having said that, it looks like they are mixing up the notions of doing integer division and fixed-point division.

In the first image G = 9 and D = 46. 46 / 9 = 5 r 1

But are you sure that this is binary division and not polynomial division? There is a significant difference. The mere fact that they are using the terms 'G' and 'D' imply that this is polynomial division. That is also consistent with how they are adding the additional 0 bits (is the same as multiplying D by x^3 before dividing by G).
Thank you for pointing that out. It is polynomial division. In that case we use XOR to do the subtraction. Thanks.
 
Top