By Nikolai Golovchenko. See https://www.golovchenko.org/home/constdivmul for a working online form and source code.
See:
See also:
Questions:
IS there a way of getting this code generation program in a simple windows program? It would be handy for when I am working from a workstation that does not have internet access.
The program does have a command line mode (not GUI) so it could be used locally... If there is enough interest, I could sell offline versions. Perhaps this would help to support the site? +
Comments:
When used for division, except in cases where the sum of the terms exactly equals the divisor (e.g. divisor is 8/3 = 2.6666667), the computed quotient will always be slightly smaller than the actual quotient. Rounding can be helpful, particularly with small quotients. Before the final shift, simply examine the highest-order bit that would be shifted out and add it after the final shift.+
e.g. if the last shifting is 4 places and the bits that would be shifted out are 1xxx, add 1 after the last shift.
Try this for 9 divided by 3, using 7 terms. Without rounding, the quotient will be 2. Rounding "fixes" that.
Interested:
file: /Techref/piclist/codegen/constdivmul.htm, 5KB, , updated: 2022/2/16 11:24, local time: 2024/11/14 19:54,
3.147.238.94:LOG IN
|
©2024 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? <A HREF="http://massmind.ecomorder.com/Techref/piclist/codegen/constdivmul.htm"> Code Generation for Constant Multiplication/Division </A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! |
.