The binary number system is a numeral system that only knows 0 and 1.

In the “traditional” decimal system, there are ten primitive number characters to use: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

When you count the numbers, you have to reuse the primitive numbers after reaching 9. This is because there are no dedicated symbols for numbers after 9. The number after 9 is 10, which is a combination of the primitive digits 1 and 0.

In a binary system, there are only two primitive numbers: 0 and 1.

When you count with the binary numbers, you reach the limit of no more digits much quicker. This means you have to reuse 0s and 1s already after the second number.

0 1 10 11 100 101 110 111

This is a comprehensive guide to the binary number system. This guide answers questions like:

- What are number systems, like decimal or octal?
- What is a binary number system?
- How can I convert binary numbers to decimals?

Let’s start off by counting numbers in the traditional way. Please, don’t skip this phase, as it is an important first step towards understanding the binary system.

## Counting Numbers

In your everyday life, you have accustomed to using numbers between 0-9.

This is called the decimal number system. There are ten different numeric symbols in the decimal system. These are of course:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Now, when you count numbers using the decimal system, you encounter a problem. When there are more than 9 items to count, you run out of numeric symbols. The number 9 is the last digit you can use.

To overcome this, you start reusing the numbers. To do this, you strategically place the digits next to one another to represent numbers bigger than 9.

For example, the number after 9 is 10, which is a combination of one and zero. There is no way to represent the number ten with a unique character.

When you continue counting from 10, you will encounter the same problem at 19. Once again, you have used all the numbers in the decimal system, and have to reuse them to count further. Now it’s time to place number 2 to the left and run the numbers on the right from 0 to 9.

This process goes on until you reach number 99. Now both numbers have gone through the decimal system entirely. There is no way to express a bigger decimal number with two digits. In this case, you need a third one. Now the counter is at 100.

This idea continues indefinitely.

Obviously, counting numbers comes automatically. Breaking it down like this is something you’ll never have to do–unless you want to learn how the binary number system works.

But to understand how the binary system works, you have to know the mechanism of everyday numbers. More specifically, you need to see how you can reuse the numbers in the system to express bigger ones.

## Number Systems

In the previous section, you learned how the “traditional” decimal numbers work. But there is nothing special about having ten numbers in the number system. In fact, there can be as many numbers as you like.

Naturally, having a different base system affects the way how you do calculations.

For example, let’s create a base-eight number system (also called the octal numeral system).

In the base-eight system, you are restricted to using eight primitive numbers:

0, 1, 2, 3, 4, 5, 6, 7

Now let’s start counting similar to how you did in the previous section. But because now you only have eight digits to choose from, you will have to start reusing digits earlier.

For example, let’s calculate to eight in the octal system:

0 1 2 3 4 5 6 7 10

As you can see, the number after 7 is 10. This is because, in the base-eight system, the last available number digit is 7. Thus, you have to start reusing the digits exactly like before. But instead of doing it after the number 9, you have to do it after 7 in the octal system.

As another example, let’s count from 0 to 20 using both decimal and octal systems side by side:

Decimal (base-10) | Octal (base-8) |
---|---|

1 | 1 |

2 | 2 |

3 | 3 |

4 | 4 |

5 | 5 |

6 | 6 |

7 | 7 |

8 | 10 |

9 | 11 |

10 | 12 |

11 | 13 |

12 | 14 |

13 | 15 |

14 | 16 |

15 | 17 |

16 | 20 |

17 | 21 |

18 | 22 |

19 | 23 |

20 | 24 |

It’s all that simple. For example, here you can see the decimal 20 is 24 in octal.

Great! Now you have a basic understanding of numeral systems and counting.

Now you have what it takes to understand the binary numbers system.

## Binary Number System

A binary number system is a number system with only two numbers. These are the numbers **0** and **1**.

The idea of the binary system is no different than the decimal system or the octal system introduced previously.

However, in a binary system, there are much fewer available numeric characters. This means you run out of digits quicker when you count numbers.

For example, let’s count to two using a binary system:

0 1 10

Similar to how you count traditional numbers, once you have no binary digits left, you have to reuse them.

Let’s continue counting. This time, let’s count from 0 to 9 using the binary system:

0 1 10 11 100 101 110 111 1000 1001

As an example, take a look at the number 11. It is the largest number expressible with two binary digits. To create a number bigger than 11, you need to add a third binary digit to the mix.

## How to Convert Binary Numbers to Decimal Numbers?

The naive way to convert a binary number to a decimal is by starting from 0 and counting numbers all the way up to the number you are converting.

This works fine with small numbers.

But if you have a bigger number to convert, this method takes forever.

The only time you need to do manual conversions is when you are studying binary numbers. Knowing how to convert binary numbers to decimals helps you further understand how the number systems work.

To create a better system for binary to decimal conversions, let’s count binary numbers a bit further. This time, let’s count to 31 and see if we can spot some helpful pattern in the binary numbers.

Binary | Decimal |
---|---|

0 | 0 |

1 | 1 |

10 | 2 |

11 | 3 |

100 | 4 |

101 | 5 |

110 | 6 |

111 | 7 |

1000 | 8 |

1001 | 9 |

1010 | 10 |

1011 | 11 |

1100 | 12 |

1101 | 13 |

1110 | 14 |

1111 | 15 |

10000 | 16 |

10001 | 17 |

10010 | 18 |

10011 | 19 |

10100 | 20 |

10101 | 21 |

10110 | 22 |

10111 | 23 |

11000 | 24 |

11001 | 25 |

11010 | 26 |

11011 | 27 |

11100 | 28 |

11101 | 29 |

11110 | 30 |

11111 | 31 |

Let’s examine the binary numbers. There is a clear pattern between the binary numbers and the decimal numbers.

Whenever there is a one followed by zeros only, the corresponding decimal number is a power of two.

For example:

- 1 –> 1
- 10 –> 2
- 100 –> 4
- 1000 –> 8
- 10000 –> 16

Now, let’s re-write the above observation using powers of two:

- 1 –> 2⁰
- 10 –> 2¹
- 100 –> 2²
- 1000 –> 2³
- 10000 –> 2⁴
- .
- .
- .

This observation helps you when you want to manually convert binary numbers to decimal numbers.

Based on this observation, we can create a table for powers from 0 to 7:

2⁷ = 128 | 2⁶ = 64 | 2⁵ = 32 | 2⁴ = 16 | 2³ = 8 | 2² = 4 | 2¹ = 2 | 2⁰ = 1 |
---|---|---|---|---|---|---|---|

0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

This table represents an eight-digit binary number.

Now, whenever you see “1” in any column, it means the corresponding power of two is present in the binary number.

So to convert from binary number to decimal, you have to add up all the present numbers in the observation table.

Let me show you what I mean.

For example, let’s convert the binary **1101** to a decimal number.

First of all, whenever you are dealing with binary numbers, you can add as many 0s on the left-hand side as you want.

So when we speak of **1101**, we can also write it down as **00001101**.

Now, let’s insert these 0s and 1s of this number into the binary table:

2⁷ = 128 | 2⁶ = 64 | 2⁵ = 32 | 2⁴ = 16 | 2³ = 8 | 2² = 4 | 2¹ = 2 | 2⁰ = 1 |
---|---|---|---|---|---|---|---|

0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |

To convert the number to decimal, let’s start from the right.

**There is one 2⁰ = 1 present.**- There is no 2¹ = 2 present.
**There is one 2² = 4 present.****There is one 2³ = 8 present.**- There is no 2⁴ = 16 present.
- There is no 2⁵ = 32 present.
- There is no 2⁶ = 64 present.
- There is no 2⁷ = 128 present.

Now, let’s add up the values that are present in the binary. This gives us 1 + 4 + 8 = 13. So the binary number 1101 is 13 in the decimal base.

## Wrap Up

Today you learned how the binary number system works.

To put it short, in a binary system you can only do calculations with numbers 0 and 1.

In a “traditional” number system, you have ten numbers to do the calculations with. When you count numbers in the traditional way, you have to reuse digits after the number 9. For example, the number 64 is a combination of the primitive digits 6 and 4.

In a binary system, the idea is the same. But because there are only two numbers to use, reusing the numbers happens already right after the number 1.

For example, what would be a number 3 in a decimal base is 11 in the binary system.

0 1 10 11

Thanks for reading!

## Read Also

**Want to learn another interesting numeral base? Make sure to check what hex colors are. This guide talks about the hexadecimal (16-base) numeral system.**