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
The Computer Arithmetic unit of TU BSc CSIT Computer Architecture (CSC213) produces one long-answer question almost every year, and it is always one of three: "Perform restoring division on the given numbers", "Perform non-restoring division" or "Multiply using Booth's algorithm, showing each step". BIT students meet the same three in the Fixed Point Arithmetic unit of BIT151.
The marks come from the table. Examiners look for the registers at every step, the operation performed, and the correct final result. This article works each algorithm on a small example so the pattern of the table is clear, then states the differences that the "compare restoring and non-restoring division" question expects. The unit notes and solved papers are on the Computer Arithmetic notes page.
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.
Solved past paper versions of all three questions, with the full tables, are on the CSC213 Computer Architecture page. BIT students find the same algorithms in the Fixed Point Arithmetic Algorithms unit of BIT151.
Put it into practice
Browse all subjectsMore 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