Based on the method in this question Using 2's Complement to Perform Binary Division for Signed Number , I tried to calcuate 12 / 10
, which is 0000 1100 / 0000 1010
, but with its method I got quotient 2
and remainder -8
.
Did I get something wrong?
step 1 omitted
step 2:
0000 1100
+1111 0110
----------
10000 0010
carry bit discarded, quotient=0+1=1 , do step 3
step 3:
0000 0010
+1111 0110
----------
1111 1000
calculation stopped, quotient=1+1=2 , remainder is 1111 1000 = -8