Counting in Binary

Table of Contents

Talking from experience , a lot of mediocre teachers don’t introduce binary numbers properly at all. They instead give you an algorithm to compute the binary representation of any given decimal number and hand it out to you without knowing why it is the way it is. Today, we are going to understand that process, but first we are going to learn to count.

Counting #

So, assume you are a toddler who is learning to count. You are given 10 different symbols, namely

and are told that in this sequence each subsequent symbol represents the next number, formally known as the successive number. So, we begin counting. We start with this symbol: , then we say, by adding “one”, we get this: , then we get and so on until . But then what? We ran out of all the symbols, so how do we show the successor of ?

Well, the decimal system invented the concept of place values. Since we ran out of digits to count, we just add another digit to the front of the previous one, and start counting again. Until now, that place didn’t exist, so we could say we were counting

and now the “tenth” number is represented by adding one to the left side place, like so: . Subsequent numbers can be counted again, starting from till . After that, we complete the digits once again, so we add another digit on the tenth place (signifying that another set of 10 numbers has been added) to form . We continue adding successive digits to the tens place until we reach . Now how do we write the the successor of ? Well, we create another place which counts how many tens of tens have been completed. We completed tens nine times until now, and the successor of 99 will be the tenth ten. We also start naming every tenth ten as a hundred. When we count nine hundreds, we say the tenth hundred represents a thousand, and so on, each time adding a place to the left of the digits. All these places show how many powers of ten we reached until now.

If you observed our counting process carefully, you would notice that an increase in the rightmost digit signifies the increase in the factor of zeroth power of ten (just 1), the second rightmost digit increased the factor of first power of ten (tens), the third rightmost digit increased the factor of second power of ten (hundreds) and so on. Just by putting it this way, I am trying to make the place value system which we learnt in primary school more intuitive.

Thus, we conclude by saying that any number, say is just

Counting with Two Digits #

Well, we essentially repeat the same steps as above to count in binary. Just that this time, you don’t have ten different symbols. You only have the symbols and .

We start again with the number . It’s successor is . Now we ran out of symbols, so we do the same thing as we did before .i.e, add a digit to the left. So the next number is , followed by . Now we ran out of digits again, so we add another digit to the left to get , followed by . We continue this process like so:

Take a moment to observe that this is essentially the same process as before, we didn’t invent some magical representation. It is just as natural as before, just that we don’t have a lot of digits to count with. You might notice that every place in a number now signifies a power of two. Which means, the number 1100 is

You can evaluate this sum to get the decimal representation if you want, or you can keep it just like that. It doesn’t really matter, they mean the same thing, just with a different set of symbols (or digits).

In fact, apart from the standard algorithm to convert decimals into binary, you can use some basic intuition too. If you want to represent the number 37, think of the largest number less than 37 which is a power of two. Well, is , so the sixth place from the right is going to be a 1. Next, we are left with . Now, is going to be , so the third place from the right is going to be a 1. Next, we are left with , so the first place from the right is going to be a 1.

The binary representation will be . It is really that easy.