Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I don't know much about Basic, but it's usally better to right shift than divide, especially when you divide by a power of 2. Shifting is not as demanding a task as division. 1024 is the same as 2^10 so instead of division by 1024 you should right shift 10 times.
You should also do all multiplications before division, to minimize rounding errors.
In C it would look something like this:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.