A is for Abacus
Hundreds of years before calculators were invented, people in China discovered they could add and subtract quickly by sliding beads back and forth on strings. They put seven beads on a string and mounted a few of these strings in a wooden frame. We call the device an abacus. It was a great time-saver, and it soon spread to other parts of Asia. The Russians wanted more beads on their abacuses, so they strung ten on each string. The Japanese figured out how to add and subtract just as quickly with only five beads on each string.
Today many people in China and Japan still use abacuses. The strings represent place values (1s, 10s, 100s, etc.), and the positions of the beads along the string represent the number of 1s, 10s, or 100s being used. If you think pushing beads back and forth is slow work, think again. In contests between people using calculators and people using abacuses to add and subtract, the abacus users usually win! Some Chinese and Japanese shopkeepers don’t even need a real abacus. They just move their hands in the air, sliding imaginary beads back and forth on imaginary strings. But they still get a real answer!B is for Binary
Suppose that instead of getting your regular allowance, you have a choice: You can have a million dollars. Or you can have a penny.
Well, not just a penny, but one cent today, two cents tomorrow, four cents the next day, eight cents the next, and so on, for 30 days. Each day, the amount will double. Which would you choose?
Let’s see how many pennies you would get each day during the first week:
1 2 4 8 16 32 64
On the seventh day, you’ll receive 64 cents. It doesn’t seem like a very good deal, does it? But this is just the first week. While the money is coming in, let’s take a close look at the numbers. When you start with 1 and double it to get 2, then double 2 to get 4, then double 4, and keep on doubling, you get a sequence of numbers called the binary sequence. The numbers are called binary numbers. There is something very important about binary numbers.
You can add binary numbers to make any other number. While 5 is not a binary number, you can make 5 by adding 4 and 1, which are binary numbers. To make 13, add 8, 4, and 1. You can make every number from 1 to 127 out of the first seven binary numbers.
On this page is a chart showing how. On the right side of the chart are decimal numbers--the regular kind you use every day. At the top of the chart are binary numbers. Find the decimal number you want to make and look to the left of it. Wherever you see a check mark, use the binary number at the top of that column. You can create 7 by adding 1, 2, and 4 (that’s why they are checked). You can make 13 by adding 8, 4, and 1. We started the chart--now you finish it. (No, you may not write in the book!)
Suppose we put a 1 wherever there’s a check mark, and a 0 wherever there isn’t a check mark. (We won’t put anything to the left of the first 1.)
What we have here is the binary system, a way of writing numbers using only 1s and 0s. In this system, the number 5 is written 101 and the number 15 is written 1111.
You’re probably wondering why anyone would want to write such long, funny-looking numbers with just 1s and 0s that take up so much room on the page. Well, the binary system isn’t meant for the page. It’s meant for the chip. The computer chip.
Computers “think” in binary. A computer chip has lots and lots of invisible electric switches called bits. A bit can be on or off. That’s all it can be. On or off, off or on. It has no brain. It has no variety. It just has on and off. Think of off as the number 0. Think of on as the number 1. Put six bits in a row, and starting at the right side, turn the first one on, turn the next one off, the next one on, the next one off, the next two on. What have you got? You’ve got the binary number 110101, or 53 in the decimal system. Just use a chart like ours to figure it out.
That’s how computers work. A computer turns everything (even letters and pictures and music) into 0s and 1s by turning some bits on and some bits off. The 1s and 0s make binary numbers.
Okay, you say. The binary system can handle small numbers like 1 and 3 and 20 and maybe 153, but it would take billions of bits to make a really big number, like 536,870,912--right? Well, no. It would take only 30 bits to make that number. If you started with 1 and doubled it, then doubled that, and kept doubling, when you got to the 30th number in the binary sequence, you’d have 100000000000000000000000000000 (a one with 29 zeros). Or in the decimal system, 536,870,912. Exactly.
Remember those pennies? Now we know how many you’d get on the 30th day of doubling: 536,870,912. Hmmm. That’s the same as $5,368,709.12. And that doesn’t count what you received on each of the other days!
Now which would you choose? A million dollars or a penny?
Excerpted from G Is for Googol by David M. Schwartz. Copyright © 2004 by David M. Schwartz. Excerpted by permission of Tricycle Press, a division of Random House LLC. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.