Restoring and non restoring division algorithm

  • Thread starter Thread starter RobikShrestha
  • Start date Start date
  • Tags Tags
    Algorithm Division
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 30K views
RobikShrestha
Messages
37
Reaction score
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.
 
Physics news on Phys.org
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?
 
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:
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.
 
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.
 
link to a pdf with an explanation of their implementation:

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