Non-Restoring Division Calculator
Perform unsigned binary division using the non-restoring division algorithm. Track accumulator A, quotient Q and divisor M through left shifts, add-or-subtract decisions, quotient-bit generation and the final remainder correction.
| Cycle | A Sign Before | A,Q After Shift | Operation | A After Operation | Q0 | Q After Decision | Status |
|---|---|---|---|---|---|---|---|
| Enter values and calculate to view all division cycles. | |||||||
What Is Non-Restoring Division?
Non-restoring division is a sequential binary division algorithm used to calculate an unsigned quotient and remainder using shifts, addition and subtraction.
The key difference is how it handles a negative partial remainder. Instead of immediately restoring accumulator A after an unsuccessful subtraction, the negative value is retained.
During the next cycle, the sign of A determines whether divisor M should be added or subtracted after the combined A and Q registers are shifted left.
Registers Used in Non-Restoring Division
A — Partial Remainder
Accumulator A stores the current partial remainder and may temporarily contain a negative value.
Q — Dividend and Quotient
Q begins with the dividend and gradually becomes the quotient as one quotient bit is generated per cycle.
M — Divisor
M stores the positive unsigned divisor and remains unchanged throughout the algorithm.
Sign of A
The sign of A determines whether the next cycle subtracts M or adds M.
Non-Restoring Division Algorithm Steps
A = 0
Q = Dividend
M = Divisor
For each cycle:
If A is non-negative:
Shift A,Q left
A = A – M
If A is negative:
Shift A,Q left
A = A + M
After the arithmetic operation:
If A is non-negative:
Q0 = 1
If A is negative:
Q0 = 0
Repeat for n cycles.
After the final cycle:
If A is negative:
A = A + M
Final Q = Quotient
Final A = Remainder
Non-Restoring Division Decision Table
| A Before Cycle | Operation After Shift | A After Operation | Q0 |
|---|---|---|---|
| Non-negative | A = A – M | Non-negative | 1 |
| Non-negative | A = A – M | Negative | 0 |
| Negative | A = A + M | Non-negative | 1 |
| Negative | A = A + M | Negative | 0 |
Why Is It Called Non-Restoring Division?
When subtraction produces a negative partial remainder, the algorithm does not immediately add the divisor back during the same cycle.
Instead, the negative accumulator is preserved. During the next cycle, M is added rather than subtracted.
A – M becomes negative.
Restoring approach:
Immediately add M back.
Non-restoring approach:
Keep negative A.
Next cycle uses A + M.
Why Is a Final Remainder Correction Needed?
Because negative intermediate remainders are allowed, accumulator A may still be negative when all quotient cycles have finished.
If this happens, one final addition of divisor M is performed to produce the conventional non-negative remainder.
A = A + M
After correction:
0 ≤ A < M
Worked Example: 13 ÷ 3
1101 = 13
Divisor:
0011 = 3
Result:
Quotient = 0100 = 4
Remainder = 0001 = 1
Verification:
3 × 4 + 1 = 13
Worked Example: 15 ÷ 3
1111 = 15
Divisor:
0011 = 3
Quotient:
0101 = 5
Remainder:
0000 = 0
Verification:
3 × 5 = 15
Worked Example: 11 ÷ 2
1011 = 11
Divisor:
0010 = 2
Quotient:
0101 = 5
Remainder:
0001 = 1
Verification:
2 × 5 + 1 = 11
What If Dividend Is Smaller Than Divisor?
0011 = 3
Divisor:
0101 = 5
Quotient:
0000 = 0
Remainder:
0011 = 3
Verification:
5 × 0 + 3 = 3
Non-Restoring Division Examples
| Dividend | Divisor | Quotient | Remainder | Check |
|---|---|---|---|---|
| 1000 | 0010 | 0100 | 0000 | 8 = 2×4 |
| 1001 | 0010 | 0100 | 0001 | 9 = 2×4 + 1 |
| 1011 | 0010 | 0101 | 0001 | 11 = 2×5 + 1 |
| 1101 | 0011 | 0100 | 0001 | 13 = 3×4 + 1 |
| 1111 | 0011 | 0101 | 0000 | 15 = 3×5 |
Restoring vs Non-Restoring Division
| Feature | Restoring Method | Non-Restoring Method |
|---|---|---|
| Negative partial remainder | Immediately restored | Retained temporarily |
| Next arithmetic step | Usually retry after shift | Add or subtract based on A sign |
| Restoration every failed subtraction | Yes | No |
| Final correction | Normally unnecessary | May be required |
| Final outputs | Quotient and remainder | Quotient and remainder |
Important Non-Restoring Division Notes
The divisor cannot be zero.
An n-bit dividend requires n division cycles.
Accumulator A may be negative during intermediate cycles.
If A is non-negative before a cycle, M is subtracted after the left shift.
If A is negative before a cycle, M is added after the left shift.
If the final A value remains negative after all cycles, a final correction is performed:
A = A + M
The final result must satisfy:
Dividend = Divisor × Quotient + Remainder