'6 BCD divide by 5 = 16 bit'
I need routine to divide by 5 a six digits BCD number and put result in
6 digit BCD / 5 = 16 bit
Any suggestion ? URL ?
Thanks to all in advance.
Sorry, my English is very bad.
On Fri, 2 Jul 1999 20:35:08 +0100 Tini Socas <ARRAKIS.ES> esocas
> 6 digit BCD / 5 = 16 bit
>Any suggestion ? URL ?
Convert the high (leftmost) 5 digits of the BCD number to binary first,
using one of the conventional methods. Ignoring the last digit
essentially divides the BCD number by 10.
Then multiply the binary result by 2 (shift it left one bit).
The binary result is now N/10 * 2 = N/5, except it doesn't include the
lowest BCD digit. It is easy to add the last digit in because it's
contribution to the final result can only be 0 or 1. If the lowest digit
is 5 or more, add 1 to the final result.
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: dl.http://www.juno.com/dynoget/tagj.
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- New search...