Understanding the Binary System

Learn about the importance of the binary numeral system in computers and how it works.

The need for the binary numeral system

Before delving into the binary numeral system, let’s think about why computers only work with zeros and ones. Why can’t they work directly with text or images, for example? The answer is that it’s rather easy to build circuits that can represent two states. If we have an electrical wire, we can either run electricity through it or not. The flow or no flow of electricity could represent several things, such as on or off, true or false, or zero or one. Let’s think of these two states as zero and one for now, with zero representing no electricity flowing and one symbolizing that we do have flow. If we can represent these two states, we could add more wires and, by doing that, have more zeros and ones.

But what could we possibly do with all of these zeros and ones? Well, the answer is that we can do almost anything. For example, with only zeros and ones, we can represent any integer by using the binary numeral system. Let’s demonstrate how that works.

How the binary numeral system works

To understand binary numbers, we must start by looking at the decimal numeral system. In the decimal system, we work with 10 digits, from 0 to 9. When we count, we go through these digits until we reach 9. Now we have run out of digits, so we start over from zero and add a one in front of it, forming the number 10. We continue until we reach 19, then we do the same thing again; start over from zero and increase the value in front of the zero by one, so we get 20.

Another way to think about different numeral systems is to think about the value a position represents. Let’s consider an example. The number 212 has the digit 2 in two places, but their position gives them two different values. If we start from the right and move to the left, we can say that we take the first digit, 2, and multiply it by 1. Then, we take the second digit, 1, and multiply it by 10. Finally, we take the last digit, 2, and multiply it by 100. If we move from right to left, each step is worth 10 times as much as the previous step. Take a look at this calculation in the following table:

Get hands-on with 1200+ tech skills courses.