How would I divide these two binary numbers?

100101/011011

This is assuming I am on a 6bit 2's complement machine. I would understand how to do it if the first number were not negative. How do I approach this?

Thank you!

Printable View

- 02-13-2009nirvana21Question About Binary Division
How would I divide these two binary numbers?

100101/011011

This is assuming I am on a 6bit 2's complement machine. I would understand how to do it if the first number were not negative. How do I approach this?

Thank you! - 02-13-2009tabstop
Why not negate the first number and then make the answer negative at the end?

Edit: Although I did verify that the usual "subtract until you get 0" method works here as well; you subtract 011011 from 100101 a total of 111111 times to get to 0, for a quotient of 111111 = -1 which you would expect from -27/27. - 02-13-2009nirvana21Quote:

Why not negate the first number and then make the answer negative at the end?

- 02-13-2009brewbuck
This has some interesting info:

http://devel-rok.informatik.hu-berli...f/eng_ca12.pdf