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

# Restoring division flowchart

Computer Organization and Architecture · Chapter 5: Computer Arithmetic

- Asked in: 2072 Kartik, 4 marks
- Video: [Restoring Division Algorithm: Flowchart, Circuit & Example Explained | COA](https://www.youtube.com/watch?v=Ek-Ea2NnjeQ) — 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/restoring-flowchart
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_organization_and_architecture/chapter-5

## Question

Draw the flowchart for the restoring division method.

## Short answer

Initialize A=0, Q=dividend, M=divisor, SC=n. Loop n times: shift left A,Q; A = A − M. If A<0: Q0 = 0 and restore A = A + M; else Q0 = 1. Decrement SC. Quotient ends in Q, remainder in A.

## Answer

The flowchart of restoring division (A = remainder register, Q = dividend/quotient, M = divisor, SC = number of bits):

```text
     +----------------------+
     | A=0, Q=dividend      |
     | M=divisor, SC=n      |
     +----------+-----------+
                v
     +----------------------+<--------------+
     | Shift left A,Q       |               |
     | A = A - M            |               |
     +----------+-----------+               |
                v                           |
            A < 0 ?                         |
        Yes /       \ No                    |
           v         v                      |
     +----------+ +----------+              |
     | Q0 = 0   | | Q0 = 1   |              |
     | A = A+M  | |          |              |
     +----+-----+ +-----+----+              |
          +------+------+                   |
                 v                          |
            SC = SC - 1                     |
                 v                          |
             SC = 0 ? ---- No --------------+
                 | Yes
                 v
     Quotient = Q, Remainder = A
```

Restoring means adding M back to A when A − M is negative, so that A again holds the previous partial remainder. Only after n cycles are the quotient (Q) and remainder (A) final.

## Check yourself

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

1. In restoring division, what is done when A - M gives a negative A?
   A. Set Q0 = 1 and keep A negative
   B. Set Q0 = 0 and subtract M again
   C. Set Q0 = 0 and add M back to A
   D. Set Q0 = 1 and add M back to A
   Answer: C. Restoring means adding M back so A again holds the previous partial remainder; the quotient bit is 0. (Key point: Restoring step)

2. What is done at the start of each cycle in the flowchart?
   A. A = A - M then shift right
   B. Shift left A,Q then A = A - M
   C. Shift right A,Q then A = A + M
   D. Test SC and then load Q
   Answer: B. Each cycle first shifts A,Q left, then subtracts the divisor M from A. (Key point: Order of operations)

3. After SC reaches 0, where are the quotient and remainder?
   A. Quotient in Q, remainder in A
   B. Quotient in A, remainder in Q
   C. Both in A
   D. Quotient in M, remainder in A
   Answer: A. Q collects the quotient bits and A holds the final remainder after n cycles. (Key point: End of division)

## Related in Computer Organization and Architecture

- [Non-restoring division with flowchart](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Anonrestoring-explain) — Computer Organization and Architecture, chapter 5, asked 3×
- [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×
- [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×
- [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 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
- [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
