Restoring Non Restoring Division Booths Algorithm

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

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.

StepOperationAQ
StartInitialise00000111
1Shift left AQ00001110
A = A - M1110
A negative: Q0 = 0, restore A = A + M00001110
2Shift left AQ00011100
A = A - M1111
A negative: Q0 = 0, restore A = A + M00011100
3Shift left AQ00111000
A = A - M0001
A non-negative: Q0 = 100011001
4Shift left AQ00110010
A = A - M0001
A non-negative: Q0 = 100010011

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.

StepSign of A beforeOperationAQ
StartInitialise00000111
1PositiveShift left AQ, A = A - M11101110
A negative: Q0 = 011101110
2NegativeShift left AQ, A = A + M11111100
A negative: Q0 = 011111100
3NegativeShift left AQ, A = A + M00011000
A non-negative: Q0 = 100011001
4PositiveShift left AQ, A = A - M00010010
A non-negative: Q0 = 100010011
EndA non-negative, no correction00010011

Result: quotient 0011 = 3, remainder 0001 = 1, the same as before, with no restore operations.

Restoring versus non-restoring: the comparison

PointRestoring divisionNon-restoring division
Action when A goes negativeAdd M back immediately (restore)Do not restore; add M in the next step instead of subtracting
Operations per stepShift, subtract, and sometimes an extra addShift and one add or subtract
Worst-case operationsUp to 2n additions or subtractions plus n shiftsExactly n additions or subtractions plus n shifts
Final correctionNoneIf A is negative at the end, add M once
SpeedSlowerFaster, fewer operations
Hardware and logicSimpler to understandSlightly more complex control, since the sign decides the next operation
QuotientIdenticalIdentical

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).

StepQ0 Q-1OperationAQQ-1
StartInitialise000011100
10 0No operation000011100
Arithmetic shift right000001110
21 0A = A - M (add 1101)110101110
Arithmetic shift right111010111
31 1No operation111010111
Arithmetic shift right111101011
41 1No operation111101011
Arithmetic shift right111110101

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:

Put it into practice

Try a real past question on this topic, with the full answer ready to check.