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!
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!
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.
Last edited by tabstop; 02-13-2009 at 02:08 PM.
Is this how the computer would operate on this problem?Why not negate the first number and then make the answer negative at the end?
This has some interesting info:
http://devel-rok.informatik.hu-berli...f/eng_ca12.pdf
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}