NRD Hardware Division Algorithm

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.

Unsigned Division Non-Restoring Accumulator A Quotient Q Add / Subtract M Step-by-Step
Non-Restoring Binary Division Register Simulation
Unsigned binary dividend loaded into Q.
Unsigned binary divisor. Divisor cannot be zero.
Both inputs must use exactly this width.
One quotient bit is generated during every cycle.
Non-Restoring Division Result
Dividend Decimal
Divisor Decimal
Quotient Binary
Quotient Decimal
Remainder Binary
Remainder Decimal
Final Correction
Verification
Final A
Final Q
Divisor M
Cycles
Non-Restoring Division Step Table
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

Initialize:

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.

Suppose:
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.

If final A is negative:

A = A + M

After correction:
0 ≤ A < M

Worked Example: 13 ÷ 3

Dividend:
1101 = 13

Divisor:
0011 = 3

Result:
Quotient = 0100 = 4
Remainder = 0001 = 1

Verification:
3 × 4 + 1 = 13

Worked Example: 15 ÷ 3

Dividend:
1111 = 15

Divisor:
0011 = 3

Quotient:
0101 = 5

Remainder:
0000 = 0

Verification:
3 × 5 = 15

Worked Example: 11 ÷ 2

Dividend:
1011 = 11

Divisor:
0010 = 2

Quotient:
0101 = 5

Remainder:
0001 = 1

Verification:
2 × 5 + 1 = 11

What If Dividend Is Smaller Than Divisor?

Dividend:
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

Important: this calculator performs unsigned integer division.

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

Related BinaryCon Tools

Non-Restoring Division Calculator FAQs

What is non-restoring division?
Non-restoring division is a binary division algorithm that allows the partial remainder to remain negative between cycles instead of immediately restoring it.
Why is it called non-restoring?
A negative result is not immediately restored by adding the divisor back. The next cycle instead performs the opposite arithmetic operation.
What is stored in A?
A stores the partial remainder and can be either positive or negative during intermediate cycles.
What is stored in Q?
Q initially stores the dividend and gradually becomes the quotient.
What does M represent?
M is the positive unsigned divisor.
When is M subtracted?
M is subtracted after shifting when accumulator A was non-negative at the start of the cycle.
When is M added?
M is added after shifting when accumulator A was negative at the beginning of the cycle.
How is the quotient bit selected?
After the cycle’s addition or subtraction, Q0 becomes 1 if A is non-negative and 0 if A is negative.
Why is a final correction sometimes needed?
If A remains negative after the final cycle, adding M produces the conventional non-negative remainder.
How many cycles are required?
A standard n-bit non-restoring division performs n cycles.
Can the divisor be zero?
No. Division by zero is undefined, so the calculator rejects a zero divisor.
Does this calculator perform signed division?
No. This implementation demonstrates unsigned non-restoring binary division.
How can the final result be checked?
Multiply the divisor by the quotient and add the remainder. The result should equal the original dividend.
Scroll to Top