The Technofile Web site has moved.


Technofile is now located at http://twcny.rr.com/technofile/
Please update your links, bookmarks and Favorites.  
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 

All the math you can do on two fingers

technofile  by al fasoldt

Columns and commentaries in a life-long dance with technology
 

Simple gray rule


All the math you can do on two fingers
 

By Al Fasoldt

Copyright © 1994, The Syracuse Newspapers

We had a cheer in high school that started like this: "2-4-6-8, who do we appreciate?" I thought of that cheer the other day when I was checking out computer memory.

I was looking at a RAM chip that held a megabyte—a million bytes—of memory. Any sensible, 10-fingered person can tell you a megabyte should mean 1 million bytes, right?

But a megabyte's not a million bytes. Computers don't count on their fingers the way we do. In other words, they don't use what math nerds call the Base 10 system, and so a megabyte is 1,048,576 bytes, not 1 million bytes.

This sounds dumb, but computers really can't count past 1. They start at zero, and when they get to 1 they have to start over. If you add 1 plus 1, you get 2, right? But a computer gets 10.

It sticks a zero at the right and plunks a 1 down to the left of it. (And it doesn't call that a "10," either. It's a "binary two." Yuck!)

People with nothing better to do with their time can learn how to count like computers, but the rest of us can get by if we just think of this oddity as the Base 2 system. Like the school cheer, more or less, computers count in a "twosie" fashion.

As I mentioned in the previous article, memory in a computer is set up like a lot of little mailboxes. In the computer's RAM chips, each mailbox has its own address.

In real life, most of us end up with addresses like "2204 Main St." Lucky stiffs get the corner lots, so they have addresses like "Main Street at Fifth Avenue." That makes their houses easy to find.

In RAM chips, every mailbox is on a corner lot, to make sure the computer can get to that location real quick. And this, in turn, means those RAM chips need lots of little streets, called address lines.

AND THERE'S where the Base 2 problem comes in. Since computers can't add and multiply like we do, they have to work in multiples of two. That means an RAM chip can only have two addresses, or four, eight, 16, 32, 64, 128 (this gets boring fast, folks), 256 or 1,024, ad computonauseam.

We're getting into non-10-fingered math here, because 1,024 is the closest a computer memory chip can come to 1,000 when it's creating addresses. The closest it can come to 1 million is 1,048,576.

Think of it as a bonus. You get 48,576 extra bytes when you buy a 1-megabyte memory chip. Maybe it's a good thing computers count funny after all.


 Image courtesy of Adobe Systems Inc.technofile: [Articles] [Home page] [Comments: afasoldt@dreamscape.com]