>>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 / Sure. Let's start with the number 5. In binary that is: 101 Since the place value of binary is two, you can double the number by shifting it left one bit, like this: Old: 101 New: 1010 Now you add it to the original number, like this 1010 + 101 ------ 1111 The result is the number 15, which is the answer to 5 * 3! Later, Eric