Re: A86: Daedulus lookup table


[Prev][Next][Index][Thread]

Re: A86: Daedulus lookup table




you shouldn't multiply w/ djnz unless its not a power of 2. use add for
powers of 2, its faster that way. that's why lookup would be so much
faster. heck, just take over the memory and devote the whole calculator
to Daedalus :) j/k

Justin M Bosch wrote:
> 
> I know how to explain it now: say you have a * b.  To find the place in
> the table containing the product of a and b, you must multiply b by the
> number of numbers in each row (256, right?), then you must add a-1 to
> find the offset in that particular row, thereby giving you the offset in
> the table, or the answer.
> 
> a = 6, b = 3
> 
>           1     2       3       4       5       6       7
>         |====================================================
> 1       |  1    2       3       4       5       6       7
>         |
> 2       |  2    4       6       8       10      12      14
>         |
> 3       |  3    6       9       12      15      18      21
>         |
> 4       |  4    8       12      16      20      24      28
> 
> b * number of items per row + (a-1) = offset
> 3 * 7 + 5 = offset pointing to 18
> 
> I guess if you're using something like 256, it would be easy though
> because of djnz.
> 
> Justin Bosch
> justin-b@juno.com
> 
> _____________________________________________________________________
> You don't need to buy Internet access to use free Internet e-mail.
> Get completely free e-mail from Juno at http://www.juno.com
> Or call Juno at (800) 654-JUNO [654-5866]

-- 

=====================================
=                                   =
=   Kirk Meyer (mailto:_@ibm.net)   =
= http://www.bigfoot.com/~kirkmeyer =
=                                   =
=   "Set your affection on things   =
=    above, not on things on the    =
=      earth."  Colossians 3:2      =
=                                   =
=====================================


References: