Early geeks... You're an Ethiopian shaman in 1940. A tribe member asks you to do what they cannot: find the value of a herd of goats, by multiplying the number of goats (34) times the value of each goat ($7). How do you do it?
You use binary arithmetic, much as a computer would do it, of course!
First the shaman converts the number of goats to a binary number (100010), using a recursive halving procedure – easy. Then he finds the value ($7) times the first six powers of 2 (the value of each binary digit). All that's left is a simple selection and addition: he adds up the values where there's a “1” in the binary number of goats.
The shaman can use this technique to multiply any two numbers together, but it's most effective if the second number (the “value'” in this case) is a small integer, like 7.
We don't know how long the Ethiopians have been doing this, but it's a reasonable guess that it's at least decades, and quite possibly centuries. Prior to reading this, I had no idea that people had used binary arithmetic prior to the advent of digital computers...
No comments:
Post a Comment