Study guide
Restoring vs Non-Restoring Division and Booth's Algorithm: Step Tables for a Small Example
Restoring division, non-restoring division and Booth's multiplication algorithm worked step by step with 4-bit examples (7 divided by 2, and 3 times minus 2), the differences between the two division methods, and flowchart descriptions for the TU CSIT Computer Architecture exam.
2026-10-22 | notesharu team
Exam context
10-mark numerical almost every year
Notes and past questions
Study this in
Past questions
Registers used
All three algorithms use the same hardware model. A holds the partial remainder (division) or the partial product (multiplication). Q holds the dividend and then the quotient (division), or the multiplier (multiplication). M holds the divisor or multiplicand. A counter n holds the number of bits. Booth's algorithm adds a one-bit register Q-1 to the right of Q.
The examples below use 4-bit registers, dividend 7 and divisor 2 for division, and multiplicand 3 and multiplier -2 for Booth. Write the bit width you are using at the top of the answer.
Restoring division: 7 divided by 2
Initial values: A = 0000, Q = 0111 (7), M = 0010 (2), n = 4.
The algorithm, repeated n times: shift A and Q left one bit together; subtract M from A; if A is negative, set Q0 = 0 and restore A by adding M back; otherwise set Q0 = 1.
| Step | Operation | A | Q |
|---|---|---|---|
| Start | Initialise | 0000 | 0111 |
| 1 | Shift left AQ | 0000 | 1110 |
| A = A - M | 1110 | ||
| A negative: Q0 = 0, restore A = A + M | 0000 | 1110 | |
| 2 | Shift left AQ | 0001 | 1100 |
| A = A - M | 1111 | ||
| A negative: Q0 = 0, restore A = A + M | 0001 | 1100 | |
| 3 | Shift left AQ | 0011 | 1000 |
| A = A - M | 0001 | ||
| A non-negative: Q0 = 1 | 0001 | 1001 | |
| 4 | Shift left AQ | 0011 | 0010 |
| A = A - M | 0001 | ||
| A non-negative: Q0 = 1 | 0001 | 0011 |
Result: quotient Q = 0011 = 3, remainder A = 0001 = 1. Check: 7 = 2 x 3 + 1.
Subtracting M is done by adding the two's complement of M, which for 0010 is 1110. Show this once in the answer so the examiner sees you know how the subtraction is performed.
Non-restoring division: 7 divided by 2
The restoring step is wasteful: when A goes negative we add M back, then at the next step shift and subtract M again. Non-restoring division skips the restore. If A is negative after a step, the next step shifts and adds M instead of subtracting. The arithmetic works because shifting a negative A and then adding M gives 2A + M, which equals 2(A + M) - M, exactly the value restoring would have produced.
The algorithm, repeated n times: if A is non-negative, shift AQ left and subtract M; if A is negative, shift AQ left and add M. Then set Q0 = 1 if the new A is non-negative, else Q0 = 0. After the loop, if A is negative, add M once to get the true remainder.
| Step | Sign of A before | Operation | A | Q |
|---|---|---|---|---|
| Start | Initialise | 0000 | 0111 | |
| 1 | Positive | Shift left AQ, A = A - M | 1110 | 1110 |
| A negative: Q0 = 0 | 1110 | 1110 | ||
| 2 | Negative | Shift left AQ, A = A + M | 1111 | 1100 |
| A negative: Q0 = 0 | 1111 | 1100 | ||
| 3 | Negative | Shift left AQ, A = A + M | 0001 | 1000 |
| A non-negative: Q0 = 1 | 0001 | 1001 | ||
| 4 | Positive | Shift left AQ, A = A - M | 0001 | 0010 |
| A non-negative: Q0 = 1 | 0001 | 0011 | ||
| End | A non-negative, no correction | 0001 | 0011 |
Result: quotient 0011 = 3, remainder 0001 = 1, the same as before, with no restore operations.
Restoring versus non-restoring: the comparison
| Point | Restoring division | Non-restoring division |
|---|---|---|
| Action when A goes negative | Add M back immediately (restore) | Do not restore; add M in the next step instead of subtracting |
| Operations per step | Shift, subtract, and sometimes an extra add | Shift and one add or subtract |
| Worst-case operations | Up to 2n additions or subtractions plus n shifts | Exactly n additions or subtractions plus n shifts |
| Final correction | None | If A is negative at the end, add M once |
| Speed | Slower | Faster, fewer operations |
| Hardware and logic | Simpler to understand | Slightly more complex control, since the sign decides the next operation |
| Quotient | Identical | Identical |
The non-restoring method is faster because it never performs the restoring addition; its only extra work is the single correction at the end.
Booth's algorithm: 3 times -2
Booth's algorithm multiplies signed numbers in two's complement directly, and it runs faster when the multiplier contains long runs of 1s, because a run of 1s needs only one subtraction at its start and one addition at its end instead of an addition for every 1 bit.
Initial values: M = 0011 (3), Q = 1110 (-2), A = 0000, Q-1 = 0, n = 4.
The algorithm, repeated n times: look at the pair (Q0, Q-1). If it is 10, A = A - M. If it is 01, A = A + M. If it is 00 or 11, do nothing. Then perform an arithmetic shift right on A, Q, Q-1 together (the sign bit of A is copied into itself, the old Q0 moves into Q-1).
| Step | Q0 Q-1 | Operation | A | Q | Q-1 |
|---|---|---|---|---|---|
| Start | Initialise | 0000 | 1110 | 0 | |
| 1 | 0 0 | No operation | 0000 | 1110 | 0 |
| Arithmetic shift right | 0000 | 0111 | 0 | ||
| 2 | 1 0 | A = A - M (add 1101) | 1101 | 0111 | 0 |
| Arithmetic shift right | 1110 | 1011 | 1 | ||
| 3 | 1 1 | No operation | 1110 | 1011 | 1 |
| Arithmetic shift right | 1111 | 0101 | 1 | ||
| 4 | 1 1 | No operation | 1111 | 0101 | 1 |
| Arithmetic shift right | 1111 | 1010 | 1 |
Result: the product is A joined with Q = 1111 1010, which in 8-bit two's complement is -6. Check: 3 x (-2) = -6.
Two things examiners check. First, the shift must be arithmetic: the leftmost bit of A is preserved, which is why A became 1110 and not 0110 after step 2. Second, Q-1 receives the bit that falls off the right end of Q at every shift.
Booth's algorithm flowchart in words
If the question asks for the flowchart, draw it in this order: start; load M with the multiplicand, Q with the multiplier, A = 0, Q-1 = 0, count = n; a decision box on the pair Q0 Q-1 with three exits (10 goes to A = A - M, 01 goes to A = A + M, 00 or 11 goes straight on); an arithmetic shift right of A, Q, Q-1; count = count - 1; a decision "count = 0?" that loops back to the pair test if not; end with the product in A and Q. The restoring division flowchart has the same shape with the shift first, then A = A - M, then a decision on the sign of A with the restore branch.
Which numbers to practise with
The paper usually gives dividend and divisor, or multiplicand and multiplier, as small decimal numbers and expects you to choose a bit width. Use one more bit than the largest magnitude needs, so that the sign bit is free, and state the width. Practise at least one division where the quotient has a 1 in its leftmost bit, one Booth multiplication with a negative multiplicand, and one with both operands negative; the sign handling is where marks are lost.
Quick MCQs
Try these before you look at the answers.
1. In restoring division, what is done when A becomes negative after the subtraction?
(a) Set Q0 = 1 and keep A
(b) Set Q0 = 0 and add M back to A
(c) Set Q0 = 0 and keep A
(d) Set Q0 = 1 and add M back to A
2. In non-restoring division, what is done in the next step if A is negative?
(a) Shift left and add M
(b) Shift left and subtract M
(c) Shift right and add M
(d) Restore A and subtract M
3. Which method needs fewer add or subtract operations?
(a) Restoring division
(b) Both need the same number
(c) Non-restoring division
(d) Neither uses add or subtract
4. Using restoring division on 4-bit numbers, what are the quotient and remainder of 9 divided by 4?
(a) Quotient 2, remainder 1
(b) Quotient 1, remainder 2
(c) Quotient 2, remainder 0
(d) Quotient 3, remainder 1
5. In non-restoring division of 7 by 2 (4-bit registers), what does A hold after step 1?
(a) 0001
(b) 0000
(c) 0111
(d) 1110
6. In Booth's algorithm, what is done when the pair Q0 Q-1 is 10?
(a) A = A minus M
(b) A = A + M
(c) No operation
(d) Clear A
7. Booth's algorithm multiplies M = 0101 (5) by Q = 0011 (3) with 4-bit registers. What does A hold after step 1 (after the shift)?
(a) 1011
(b) 0010
(c) 1101
(d) 0101
8. Booth's algorithm with 4-bit registers multiplies 5 by -3. What is the 8-bit product?
(a) 00001111
(b) 11110001
(c) 11110000
(d) 11101111
Answers: 1 (b), 2 (a), 3 (c), 4 (a), 5 (d), 6 (a), 7 (c), 8 (b)
- Q4: 9 = 4 x 2 + 1, and the four steps give Q = 0010 and A = 0001.
- Q5: A starts at 0, so shift then subtract 0010 gives 1110, which is negative, so Q0 = 0.
- Q7: Pair is 10, so A = 0000 minus 0101 = 1011; the arithmetic shift right then gives A = 1101, Q = 1001, Q-1 = 1.
- Q8: 5 x (-3) = -15, and -15 in 8-bit two's complement is 1111 0001.
Solved past paper versions of all three questions, with full tables:
- CSC213 Computer Architecture page
- BIT students find the same algorithms in the Fixed Point Arithmetic Algorithms unit of BIT151
Put it into practice
Try a real past question on this topic, with the full answer ready to check.
More articles
Study guide
2D Geometric Transformation in Computer Graphics: Matrices and a Solved Numerical
2026-10-24
Study guide
6 Advantages of Cloud Computing, Availability and Programming Models: Exam Guide
2026-10-24
Study guide
Common Bus System in Computer Architecture with Diagram: Registers, Selection Table, Answer
2026-10-24
Study guide
Exception Handling in C++: try, catch, throw, Rethrow with Traced Examples and new/delete
2026-10-24
Study guide
Data Transfer Instructions in Computer Architecture: Mnemonic Tables, Types and Example
2026-10-24
Study guide
Definition of Constitution by Different Scholars and Government Power Distribution in Nepal 2015
2026-10-24