At 05:30 AM 3/6/98 -0500, Walter Banks wrote: >At least for the 16bit core with multiply the quickest divide by 3 >is to multiply by 0x55 and use the MS byte and add 1 if the LS byte >is greater than 7F. > >This is ((256 / 3) / 256) > >Walter Banks Since 0x55 is %01010101 in binary, try the following algorithm: A is a 16-bit register N is the 8-bit initial value, padded to 16 bits by adding a zero MSByte Shift N left 1 bit Put N in A Shift N left 2 bits Add N to A Shift N left 2 bits Add N to A Shift N left 2 bits Add N to A Answer is now in high byte of A. - Rick "What's the fastest PIC implementation?" Dickinson +---------------------------------+---------------------------+ | Enterprise ArchiTechs Company |"You can't reason someone | | Lotus Certified Notes | out of a position they | | Appl. Design & Administration | didn't reason themselves | |(818)563-1061 rtd@notesguy.com | into" -- Rick Adams, | | http://www.eArchiTechs.com | in alt.folklore.urban | +---------------------------------+---------------------------+