---
title: "Non-restoring division with flowchart"
subject: "Computer Organization and Architecture"
chapter: 5
key: "semester_5/computer_organization_and_architecture:nonrestoring-explain"
source: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/nonrestoring-explain
site: BCT Engineering
---

# Non-restoring division with flowchart

Computer Organization and Architecture · Chapter 5: Computer Arithmetic

- Asked in: 2078 Bhadra, 5 marks; 2075 Chaitra, 3 marks; 2070 Chaitra, 8 marks (asked 3 times)
- Video: [Non Restoring Division Algorithm: Flowchart and Example | COA](https://www.youtube.com/watch?v=je7RSR6w37c) — Engineering Funda
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/nonrestoring-explain
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_organization_and_architecture/chapter-5

## Question

Explain the non-restoring division along with its algorithm, flowchart and example.

## Short answer

Non-restoring division avoids restoring negative partial remainders by adding the divisor after a shift if the remainder is negative. It repeats n times: shift left, then add or subtract divisor based on sign of partial remainder. In the example 11÷3, quotient = 3, remainder = 2.

## Answer

Non-restoring division is a division method that avoids the restore step of restoring division. When a subtraction gives a negative remainder, it is not restored; instead the next step adds the divisor. This is because restoring (A + M), shifting (× 2) and subtracting M gives 2(A + M) - M = 2A + M, which is one addition after shifting.

#### Registers
A (n + 1 bits, initially 0): partial remainder. Q (n bits): dividend, then quotient. M (n bits): divisor. Counter = n.

#### Algorithm
1. A = 0, Q = dividend, M = divisor, count = n.
2. Repeat n times:
   - If the sign of A is 0 (positive): shift A:Q left one bit, then A = A - M.
   - If the sign of A is 1 (negative): shift A:Q left one bit, then A = A + M.
   - If the new sign of A is 0, set Q0 = 1; else Q0 = 0.
   - Decrement count.
3. After n steps: if A is negative, A = A + M (correct the remainder).
4. Quotient is in Q, remainder is in A.

#### Flowchart
```text
 Start: A=0, count=n
        |
        v
 A >= 0? --yes--> shift AQ left ; A = A - M
        | no                            |
        +--> shift AQ left ; A = A + M --+
                                        v
                          A >= 0 ? --yes--> Q0 = 1
                                   --no --> Q0 = 0
                                        v
                                  count = count - 1
                                        v
                              count = 0? --no--> (repeat)
                                        | yes
                                A < 0 ? --yes--> A = A + M
                                        v
                                       Stop
```

#### Example: 11 ÷ 3 (n = 4)
Dividend Q = 1011, M = 0011, A = 00000 (negative values are shown with a minus sign).

| Step | Shift AQ left: A | Q | Operation | A (new) | Q0 set | Q |
|---|---|---|---|---|---|---|
| init | 00000 | 1011 | | | | |
| 1 | 00001 | 0110 | A = A - M | -00010 | 0 | 0110 |
| 2 | -00100 | 1100 | A = A + M | -00001 | 0 | 1100 |
| 3 | -00001 | 1000 | A = A + M | 00010 | 1 | 1001 |
| 4 | 00101 | 0010 | A = A - M | 00010 | 1 | 0011 |

Final A is positive (2), so no correction is needed.

Quotient = 0011 = **3**, remainder = **2**. Check: 3 × 3 + 2 = 11. ✓

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why can non-restoring division skip the restore step?
   A. Restoring, shifting and subtracting gives 2(A + M) - M = 2A + M, i.e. one addition after the shift
   B. The remainder is never negative
   C. Q0 is always 1
   D. M is zero
   Answer: A. Adding M in the next step equals restoring then subtracting. (Key point: Why no restore)

2. If A is negative, the next step is:
   A. Shift AQ left then A = A + M
   B. Shift left then A = A - M
   C. Restore A
   D. Stop
   Answer: A. Positive A: subtract M; negative A: add M. (Key point: Operation rule)

3. Q0 is set to:
   A. 1 if the new A is non-negative, else 0
   B. 1 if A was negative before
   C. Always 0
   D. The sign of M
   Answer: A. The quotient bit depends on the sign after the operation. (Key point: Quotient bit)

4. After n steps if A is negative:
   A. A = A + M
   B. A = A - M
   C. Q is complemented
   D. Nothing
   Answer: A. The remainder must be non-negative. (Key point: Final correction)

5. The example 11 / 3 gives:
   A. Quotient 3, remainder 2 with no final correction
   B. Quotient 2, remainder 5
   C. Quotient 4, remainder -1
   D. Quotient 3, remainder 2 after correction
   Answer: A. Final A = 2 is positive, so no correction is needed. (Key point: Example 11 / 3)

## Related in Computer Organization and Architecture

- [Restoring division flowchart](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Arestoring-flowchart) — Computer Organization and Architecture, chapter 5
- [Restoring division algorithm and hardware](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Arestoring-division) — Computer Organization and Architecture, chapter 5, asked 2×
- [Signed division and non-restoring division](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Anonrestoring-division) — Computer Organization and Architecture, chapter 5
- [Restoring vs non-restoring division](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Arestoring-vs-nonrestoring) — Computer Organization and Architecture, chapter 5, asked 5×
- [Non-restoring division of 10 by 5](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Anonrestoring-10-5) — Computer Organization and Architecture, chapter 5
- [Restoring division of 31 by 13](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Arestoring-31-13) — Computer Organization and Architecture, chapter 5

## Related in other subjects

- [Algorithm and flowchart for largest](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgorithm-flowchart-largest-n) — Computer Programming, chapter 2
- [Algorithm and flowchart: quadratic roots](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgo-flowchart-quadratic) — Computer Programming, chapter 2
- [Algorithm and flowchart: distance between points](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgo-flowchart-distance) — Computer Programming, chapter 2
- [Algorithm and flowchart help; Armstrong flowchart](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgorithm-flowchart-armstrong) — Computer Programming, chapter 2
