# PICMicrocontollerBasicMath Division Methods

Archive:

Code:

• billyman3@spam@ at gmail.com
Any reciprocal 1/n where n - 1 = 2^m (and m is an integer)can be represented as a geometric series starting with 1/(n-1) and having a ratio of -1/(n-1). This is convenient because division by n is just a matter of shifting. To expand on that point, dividing by another number, q, when q's factors are made up of the sequence described earlier (3, 5, 9, 17, 33...) and the sequence 2^m (2, 4, 8, 16, 32...) is a breeze.
+

Questions:

• neil_john_breakwell@spam@ at hotmail.com asks: " Very helpful site. May I submit code routines of my own for possible inclusion ?" James Newton of MassMind replies: Of course. All submissions are moderated, although they don't appear to be.+

+

I recently adapted the 32 bit division routine from a 1979 edition of 8080 FIG-Forth to run on a 16F876. As this uses only 16 loops it is inherently faster than Peter Hemsley's 32-loop version above. Would this be worth adding to your library and if so, how?
Tom

James Newton of MassMind replies: Sure. Just post it here, but be sure to select "preformate text" from the options list.+

+

 file: /Techref/microchip/math/div/index.htm, 9KB, , updated: 2020/3/29 20:18, local time: 2023/9/27 12:21, TOP NEW HELP FIND:  18.232.179.37:LOG IN

 ©2023 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?Please DO link to this page! Digg it! / MAKE! PIC Microcontroller Basic Math Division Methods

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
 Did you find what you needed? "No. I'm looking for: " "No. Take me to the search page." "No. Take me to the top so I can drill down by catagory" "No. I'm willing to pay for help, please refer me to a qualified consultant"

.