Skip to Content, Navigation, or Footer.

Ben Schwalb | Das Coding

So we all know that computers only understand 1s and 0s. But what exactly does that mean? And why only those two numbers? The reason for only using these two numbers is a lot less mysterious than one might think. Those are simply the easiest things to represent using electricity. A "1" equates to the presence of an electrical charge and a "0" equates to, predictably, no charge. The exact same system is used on your hard drive, except with magnetic charge instead. The cool thing is that some nerds managed to use the values "1" and "0" to represent all the numbers we are familiar with.

Without really even thinking about it, we use a base ten counting system. Some readers may be reminded of the tens place and hundreds place of elementary school yore, and the idea that after you count to nine in the ones place, you have to fill the tens place and change the 9 to a 0, resulting in 10. Similarly, after working your way up to 99, you have to switch to 100.

The nerds used the binary system, "base two," for computers. So instead of starting off 0, 1, 2…9 they started 0, 1 and then stopped. So far we have two numbers: 0 and 1. Not that helpful. So we "carry the 1" and end up with 10, pronounced "two" ("tü" using the phonetic alphabet). The same trick applies from here on in, so we get: 0=0, 1=1, 10=2, 11=3, 100=4, 101=5, 110=6, 111=7, 1000=8, etc. If that still sounds complicated to you, try counting like this on your hands to get a feel for it. A finger down means "0" and a finger up means "1." You'll find that you can count up to 31 on one hand.

Ok, so we can count slowly and awkwardly. That puts us at about the end of preschool. How do we read and write? Don't worry, that one's really easy. A=1, B=2, etc. But say I wanted to spell out my name: BEN. I get 2514. Or is that BEAD? (I totally wasn't expecting that to work, by the way.) Well, that problem is not that difficult either. Since writing the last letter, 26 a.k.a. Z, only requires two digits, we'll say that every letter is written using two digits, making my name 020514. Of course the system is more complicated, so people can write letters like ¿. But that's the basic idea. Oh, and of course that's all using binary numbers inside the computer, so each letter requires eight digits.

The size required for each letter is the reason for the tab button. The people designing this typing system wanted to let computers be as lazy as people. Just like people don't want to type space four times, the computer doesn't want to store the number representing space four times, since that would require 32 digits. Instead a computer just stores one tab symbol, eight digits long.

Accidentally setting a digit wrong would just lead to a letter you've probably never seen before that probably looks cool. You may have seen something like this before. However, what amazingly almost never happens is messing up the spacing. If the computer were to somehow forget to write one bit of information, that would throw the entire spacing out of whack and could render entire documents and programs useless. Thankfully, computers don't make mistakes unless people tell them to.

--

 

Ben Schwalb is a member of the class of 2012, who majored in computer science. He can be reached at Benjamin.Schwalb@tufts.edu.