Distinguish all those floods that are
Posted in Explaining on August 27th, 2008 by avi – Be the first to commentPeople often say that computers are “all ones and zeroes”. While factually correct, I’ve never been sure what kind of impression that leaves in the mind of those who are not too familiar with the technical details of computer internals. I’m going to try here to explain in a little bit more detail what exactly we mean when we say “ones and zeroes”. To begin with, let me simplify my language a little bit and from here on in I will use the term “digital” to mean “containing ones and zeroes”.
Very nearly everything in and around your computer is digital. That is to say, they represent information as sequences of things that can be either on or off, with no other possible states. Imagine bits like pieces from Reversi, with the black side being “on” (think of it as being filled in) and the white side being “off”. If you arrange those pieces in a row, then you would have a reasonable facsimile of the storage system of your computer. Of course, in order to equal the data in, say, your iPod shuffle, you would need 125 million Reversi sets which would cost you over a billion dollars, so it’s good that real computers use a more efficient storage mechanism.
So, what does your computer do with all of these bits? At a very basic level, it uses them to represent different numbers using the base-2 or binary numbering system. A lot of people get confused by the idea of binary numbers, so let’s go over that quickly. We’re all familiar with base-10 numbers, so let’s start there. When you see the number “2183″, you know that the “1″ represents the number of 100s, the “8″ represents the number of tens and the “3″ represents the number of ones, meaning that “2183″ represents a number equal to the sum of:
(2 * 1000) + (1 * 100) + (8 * 10) + (3 * 1).
What you will see here is that the numbers we’re multiplying by are increasing powers of 10. 1000 is 10 cubed, 100 is 10 squared, 10 is ten to the first power and any number raised to the 0th power is always one. The same pattern applies to binary numbers; for example, the number 10101 in binary is equal to:
(1 * (2^4)) + (0 * (2^3)) + (1 * (2^2)) + (0 * (2^1)) + (1 * (2^0)).
If we remove anything multiplied by zero and calculate the powers of two, we get:
(1 * 16) + (1 * 4) + (1 * 1).
Which is just equal to 21. This is the system that allows your computer to represent any number using only “ones and zeroes”. And just like a 3 digit decimal number allows us to represent any number between 0 and 9999 (which is 10^4 – 1), a 3 bit binary number allows us to represent any number between 0 and 2^4 – 1, or 15. So the difference between a “32 bit” computer and a “64 bit” computer is that the 32 bit computer can only handle numbers as big as roughly 4 million at one time, whereas a 64 bit computer can handle numbers as big as roughly 10 septillion (that’s a 1 with 19 zeroes after it).
I’ll talk more later on about how this kind of representation is used by various parts of your computer to store data and perform calculations.



