Computers only understand two things: on (1) or off (0). So, how do we get them to do everything else? Welcome to the world of binary.
We may receive a commission on purchases made from links.
If you don’t already know how computers work, it may seem like an unapproachable subject. It’s the kind of high-level science and math that can seem inaccessible to the average person. Though things can indeed get pretty complicated, the core of computing is mostly just simple things happening on a massive scale. So, if you ready your brain to accept that scale, there’s a lot you can learn and understand without needing a fancy education or innate mathematical talent.
Binary code is the perfect place to start — it’s conceptually simple but practically complex, and to computers, it’s everything. Binary is the power behind the 4K YouTube video you’re watching, the smartphone in your pocket, the servers keeping the internet on, and banking software ensuring your money is secure. So, let’s look at exactly what binary is, what they do with it, and why it’s so important.What is binary?
The first thing to know about binary is that it’s a counting system. Just like we use the symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 to express all the numbers in existence, the binary counting system uses zeros and ones to express these same numbers. Our usual system is called decimal, or base 10, and counts in chunks of 10. The binary system, also known as base two, counts in chunks of two. As an example, let’s count this collection of asterisks:
✱ ✱ ✱ ✱ ✱
Using the base 10 counting system, we’d express this number as five (5). Using the base two counting system, we’d express it as 101. While they look very different, both versions refer to the same amount of asterisks.
So, if they’re doing the exact same job, then what is the point of having two different systems? Well, counting systems are extremely contextual — the way they work is based on what’s convenient and natural for the entity that’s doing the counting. Humans chose base 10 because we have 10 fingers and use those fingers to help us count. We have unique symbols for 0 to 9, and when we pass 9, we add a 1 to the front and cycle back through.
If we had six fingers, we’d have unique symbols for 0 to 5, and then add a 1 to the front and cycle back through. In other words, in base six, «10» would equate to our number six.Who would choose to count in binary?
So, if humans chose base 10 to count in because they have 10 fingers, who would choose to count in base two? Perhaps a turtle because they only have two fingerless flippers. Or a penguin because they only have two fingerless wings. Or a computer, because the teeny tiny components that make up a computer only have two states — on (1) or off (0).
At their core, computers are machines that use electrical current to flip switches. Each switch can only ever be on or off; there are no other outcomes. This means that if a computer wants to count, it’s restricted to base two. It has two digits — 0 and 1 — and when it passes 1, it has to add 1 to the front and cycle back through. In other words, as strange as it may seem, one is 1, and two is 10. Using binary, this is what we get with the first five numbers:
In this system, digits are switches, and you can store any number you want as long as you have enough switches to express it.