Non-Restoring Division Algorithm Simulator

Visualize the step-by-step process of binary division using the Non-Restoring Division Algorithm

A
0000
Q
0000
M
0000
-M
0000

Algorithm Steps

Step: 0/0
Enter values and click "Calculate" to begin

About Non-Restoring Division Algorithm

The non-restoring division algorithm is a method for dividing two signed binary numbers. It's called "non-restoring" because it doesn't require restoring the remainder after a negative result, making it more efficient than the restoring division algorithm.

Algorithm Steps:

  1. Initialize A to 0, Q to dividend, M to divisor, and -M to two's complement of divisor.
  2. Repeat for each bit:
    • If A is positive:
      • Shift A and Q left
      • Subtract M from A (A = A - M)
    • If A is negative:
      • Shift A and Q left
      • Add M to A (A = A + M)
  3. After the operation:
    • If A is positive: Set Q0 = 1
    • If A is negative: Set Q0 = 0
  4. After all bits are processed:
    • If A is negative, add M to A to restore the remainder
  5. Final quotient is in Q, remainder is in A

Key Differences from Restoring Division: