Topics Topics Edit Profile Profile Help/Instructions Help Member List Member List  
Search Last 1|3|7 Days Search Search Tree View Tree View  

Binary division restoring algorithm P...

:: EPE Chat Zone ­:: ­Radio Bygones Message Board :: » EPE Forum Archives 2007-2009 » Archive through 16 May, 2007 » Binary division restoring algorithm PIC 18F family « Previous Next »

  Thread Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Frequent Contributor
Username: atferrari

Post Number: 370
Registered: 05-2005

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 07 May, 2007 - 12:21 am:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Four days ago I finished the testing of a binary division algorithm 3216 unsigned, based on the "restoring" method.

It may be found here: , where you will look for "PICs" scrolling down to below MUL_1616U

My comments:

a) Something that nobody tells you about the actual implementation of this method:

the shifting to the left of the dividend can cause an overflow detectable ONLY, through testing the Carry bit. (If set, the divisor must be substracted from the dividend as indicated by the method). Otherwise, the standard test "is divisor equal or less than dividend?" will fail, leading you to a final wrong result.

Just by working backwards from few known results, I realized that a failure appeared when, at least, one overflow occurred due the dividend shifting along the process.

b) The other routines are simple ones, that I use quite often. I know their limits and they fit my current needs. Please neglect them.

The other binary division routine based on the "Kenyan" algorithm (see a posting of myself from few days ago) completes the lot.

/Edit to add:
Regarding this last, my lawyers advised not to require royalties anymore to those using it... but to pay them some $$$ instead!!

(Message edited by atferrari on 07 May, 2007)
Agustín Tomás - Buenos Aires - Argentina

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page