Restoring and non restoring division algorithm

  • Thread starter Thread starter RobikShrestha
  • Start date Start date
  • Tags Tags
    Algorithm Division
AI Thread Summary
Restoring and non-restoring algorithms for division are essential concepts in computer arithmetic. Restoring algorithms function similarly to long-hand division, while non-restoring algorithms provide a more efficient method by avoiding the need to restore the dividend during each step. The discussion highlights a discrepancy between the algorithm presented on Wikipedia and its implementation in some mini-computers, noting that the latter often uses a quotient represented by conventional binary digits (0s and 1s) instead of -1 and +1. For signed numbers, additional processing steps are required, such as adjusting the dividend and remainder. Understanding the mathematical foundation behind these algorithms is crucial for grasping why they work, especially in relation to conventional division methods. Resources such as specific algorithm links and implementation explanations are shared for further study.
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.
 
Technology 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
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.

Similar threads

Back
Top