Multiplication is quick addition. x + x + x = 3x and 2 * x + x = 3x Implemented in a PIC is very fast since it is a shift left (this is the binary part which doubles the number) and then add the original value. Dividing by 3 isn't as straight forward as suggested since the "original" value to subtract isn't known. Rich At 08:53 PM 2/26/98 +0100, you wrote: >>On 23 Feb, jhobbs wrote: >/I once knew a fast trick for divide by 3, but now I am unable to reproduce >>/it. If someone can share it with me (and others) that would be great. >>/ >>/Take care -Jim > >> Simple. To multiply by 3, double and add to original. To divide by 3, >>just do the inverse! >>-- Mel Evans > >Could someone unfold that for a binary math newbie, please? >/Morgan >/ Morgan Olsson, MORGANS REGLERTEKNIK, SE-277 35 KIVIK, Sweden \ >\ mrt@iname.com, ph: +46 (0)414 70741; fax +46 (0)414 70331 / > > ========================================= = Abolish the Income Tax! Fire the IRS! = = http://www.nrst.org/ = =========================================