Restoring and non restoring division algorithm

In summary, Restoring and non-restoring algorithms for division work similarly to doing long hand division by hand. However, there are alternative algorithms that produce conventional 0s and 1s for the quotient instead of -1s and +1s. These algorithms may require pre and post processing for signed numbers. The reason why they work can be understood by going through the math, and there are resources available online to explain the implementation of these algorithms.
  • #1
RobikShrestha
37
1
Can anyone please explain to me how and why do restoring and non restoring algorithms for division work and please provide me with a correct flowchart for the non restoring division.
 
Technology news on Phys.org
  • #2
RobikShrestha said:
Can anyone please explain to me how and why do restoring and non restoring algorithms for division work and please provide me with a correct flowchart for the non restoring division.
Is this a homework problem? If so, have you done any research to find the answers to your questions?
 
  • #3
restoring algorithms are similar to doing long hand division by hand.

I did a web search and found that Wiki's "non-restoring" algorithm is not what was/is used in the few mini-computers that implemented it. The Wiki algorithm shows a quotient made of up -1, +1, while there's an alternaltive algorithm that produces conventional 0's and 1 for the quotient. Link to a more typcial algorithm:

http://fourier.eng.hmc.edu/e85/lectures/arithmetic_html/node8.html

For signed numbers, there is some pre and post processing (decrement of negative dividend, increment remainder, ...)

As for why it works, you should go thorugh the math (not sure if this is homework).
 
Last edited by a moderator:
  • #4
Mark44 said:
Is this a homework problem? If so, have you done any research to find the answers to your questions?

I have already learned the algorithm but I do not know why it works.
 
  • #5
rcgldr said:
As for why it works, you should go thorugh the math (not sure if this is homework).

This is not homework. The homework was to code the program which I have already done. My main concern is why it works. I mean I want to relate the algorithm to our conventional division.
 
  • #6
link to a pdf with an explanation of their implementation:

http://www.freescale.com/files/microcontrollers/doc/support_info/BeyondBits2article07.pdf
 

FAQ: Restoring and non restoring division algorithm

1. What is the difference between restoring and non restoring division algorithm?

Restoring division algorithm is a method used to find the quotient and remainder when dividing two numbers. It involves a "restoring" step where the remainder is added back to the partial remainder in each iteration. Non restoring division algorithm is a variation of this method where the partial remainder is not restored, but rather the divisor is subtracted from it in each iteration.

2. Which algorithm is more efficient?

In general, non restoring division algorithm is considered to be more efficient because it requires fewer steps and operations compared to restoring division algorithm. However, the efficiency also depends on the specific implementation and hardware used.

3. Can restoring and non restoring division algorithms handle negative numbers?

Yes, both algorithms can handle negative numbers as long as the proper sign is assigned to the quotient and remainder. For example, a negative dividend and a positive divisor will result in a negative quotient and remainder.

4. What are some common applications of these division algorithms?

Restoring and non restoring division algorithms are commonly used in computer processors and digital circuits for performing arithmetic operations. They are also used in cryptography for encryption and decryption processes.

5. Are there any limitations to these algorithms?

One limitation of restoring and non restoring division algorithms is that they cannot handle division by zero, which would result in an undefined answer. Additionally, they may not be suitable for handling very large or very small numbers due to the limited precision of computer arithmetic.

Similar threads

Replies
10
Views
1K
Replies
6
Views
1K
Replies
2
Views
902
Replies
13
Views
1K
Replies
1
Views
1K
Replies
31
Views
6K
Back
Top