Searching \ for '6 BCD divide by 5 = 16 bit' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=divide
Search entire site for: '6 BCD divide by 5 = 16 bit'.

Truncated match.
PICList Thread
'6 BCD divide by 5 = 16 bit'
1999\07\03@125113 by

Hello,

I need routine to divide by 5 a  six digits BCD number and put result in
16 bit.

6 digit BCD    /    5     =   16 bit

Any suggestion ? URL ?

Thanks to all in advance.
Sorry,  my English is very bad.

Tiny Socas
<esocasarrakis.es>

On Fri, 2 Jul 1999 20:35:08 +0100 Tini Socas <esocasARRAKIS.ES>
>
>                    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
- Today
- New search...