# How to count in binary? (basic problem)

I am trying to learn the binary number system but I keep coming up against a barrier to my comprehension. To people who are in the know this will no doubt seem an extremely elementary error so please be kind :). The problem concerns the eighth count. I’m going to explain my reasoning up to that point alongside the counting record in the hope that my error can be pinpointed. Apologies for being long-winded. Here goes…

1. First count to 1 (from 0)
2. We want to continue but have run out of digits. Therefore mark the first count with a digit on the left and begin counting from 0 again. Thus: 10 (This shows that the count is accumulative and not simply a repeat of (1) and is analogous to starting the tens column in decimal place value.)
3. Simply count forward in the right column, "carrying" the 1 from the previous count to indicate place value. Thus: 11.
4. Repeat the procedure at (2), getting the original 1 to budge up and put a zero to the left to show place value. Thus: 100.
5. Count forward, thus: 101.
6. Repeat as per (2) and (4). We now have two left columns with 1s as their value and a fresh 0 in the right column, thus 110.
7. Simply count forward in the right column as per (1), (3), (5), thus: 111.

Right, the next stage [(8)] is what baffles me. I know that the next number is 1001 but I don’t understand why. Surely if we are following the pattern I have outlined above (and, assuming this is correct) the next number should be 1101, i.e we start a new column as we did when faced with 1 on the right side at (2), (4) and (6). Instead it seems to be that when we max out on 1s (i.e. 111) we have to reset several columns at once. Why am I wrong? I know it will most likely have to do with 2 being the exponent for binary numbers but I can’t make the connection and all web explanations are overly complex. Any help gratefully received.

• There are the mathematical concepts that are numbers and ways of writing them as figures. Current preferred notation (invented by Indians, then popularized by Arabs) is positional with marked zeros. Each digit has a weight depending on its position... You can find that each natural number has one single representation using that notation (of course, other notations exist). And, btw, next number is 1000, not 1001. – TEMLIB Dec 19 '16 at 21:43
• So the number after 11 is 100 - correct. But the number after 111 is 1001 - not correct. – paparazzo Jan 18 '17 at 23:07

## 2 Answers

I don't really understand the algorithm you're trying to use to count. It seems rather complicated and, instead of trying to correct it, I'm just going to start from scratch.

Really, everything is just like decimal, only there are fewer choices for each digit. Just like decimal, leading zeroes don't alter the value of the number (0123 is the same number as 123 and 0000123) so we can always add leading zeroes if that helps us.

To add 1 in decimal, we just increase the last digit by 1, if it's not already the biggest possible value. If it is the biggest possible value, we replace it with 0 and "carry 1" to the second-to-last digit. What does that mean? Well, it just means that we increase that digit if we can and, if we can't, we reset it to 0 and carry the 1 to the previous digit. Eventually, if we started with something like 999, we'll have to say that 999 is the same thing as 0999 when we need to the 1 past the left-most 9

So, to add 1 in binary, we increase the last digit by 1, if it's not already the biggest possible value, which is 1. If the last digit is 1, we reset it to zero and "carry the 1", which we do just like we did before.

This means that it goes as follows:

• 0
• 1 (Increase the last digit)
• 10 (We can't increase the last digit, so we reset it to zero and carry the 1. We've run out of digits, so we put a new zero on the left. Then, to carry the 1, we add 1 to that new digit.)
• 11 (Increase the last digit)
• 100 (Reset the last digit to zero, carry the 1. Reset the second-to-last digit to zero, carry the 1. No digits remain, so put a new zero on the left and carry the 1 to it.)

Perhaps it was overly complicated to say that we put a zero on the left-end of the number and then increase it; I could have just said that we put a one on the left end and we're done. I used the slightly longer formulation because you can keep using that when you start adding numbers bigger than one.

Let's slow down. It seems like you're trying to do addition with binary? Let's understand how numbers are represented normally with base 10.

For instance, let's deconstruct a number like 812. 812 = 8(10^2) + 1(10^1) + 2(10^0)

Notice a pattern here?

Let's deconstruct a number like 7 in binary. 7 is written as 111. 7 = 1(2^2) + 1(2^1) + 1(2^0)

Just for emphasis, 6 is 110 or 1(2^2) + 1(2^1) + 0(2^0).

Now back to your example. If we wanted to add two numbers, say 7 and 6, we do the same as if it was base 10.

 111 110 -equal sign- 1101  Remember, binary cannot have a digit whose value is greater than 1, so we have to carry the 1.