Skip to main content

Non-restoring division of 10 by 5

Short answer

Non-restoring division shifts left and either subtracts M if A was positive or adds M if A was negative, then sets Q0 from the sign of A; correct the remainder by adding M if final A is negative. For 10 divided by 5, quotient is 2 (0010) and remainder is 0.

Divide 10/5 using non-restoring division.

Non-restoring division: in each step shift A,Q left; then, if A was ≥ 0 before the shift, do A = A − M, and if A was < 0, do A = A + M. Set Q0 = 1 if the new A ≥ 0, otherwise Q0 = 0. At the end, if A < 0, add M once to correct the remainder.

Dividend = 10 = 1010 (Q), divisor M = 5 = 00101, A = 0, n = 4. No restoring is done; the next step uses the sign of A.

Step  Action                              A      Q
-     Initial                             00000  1010
1     Shift left A,Q                      00001  0100
      A>=0 before shift: A = A - M (=-4)  11100  0100 (Q0=0)
2     Shift left A,Q                      11000  1000
      A<0 before shift: A = A + M (=-3)   11101  1000 (Q0=0)
3     Shift left A,Q                      11011  0000
      A<0 before shift: A = A + M (=0)    00000  0001 (Q0=1)
4     Shift left A,Q                      00000  0010
      A>=0 before shift: A = A - M (=-5)  11011  0010 (Q0=0)
      Final A<0: A = A + M                00000  0010

Answer: 10 ÷ 5: quotient = 2 (0010), remainder = 0

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 5 questions →