I was recently reminded of the quip about how there are 10 types of people – those who can read binary, and those who can’t (rimshot). If you’re in the camp that doesn’t understand that joke, you’re in luck – in this article, we’re going to show you how to do exactly that!
What is binary?
Binary is the number system at the heart of modern computing that uses only 1’s and 0’s. Essentially, it’s just a way of representing numbers that a computer can understand. Computers operate using electrical signals that have only two states: on and off. These states are most easily represented by the digits 1 and 0, so binary is a natural fit for use in digital technology. Every piece of data you interact with, whether it’s a photo, a song, or a line of text, is ultimately broken down into a series of binary digits, or bits, that your computer can read.
But I hear you ask, “If binary only uses 1’s and 0’s, how exactly does a person read a binary number?” To do that, we have to understand our own number system first.
Base 10 vs. Base 2
We often refer to our numbering system that we use every day as the decimal system, but it’s also known as base 10. It’s called this because it uses ten digits (0 through 9), and each digit’s position in a number represents a power of ten. For example, in the number 345, the digit 3 represents three hundreds, the 4 represents four tens, and the 5 represents five ones. Binary works the same way, but with only two digits: 0 and 1. Each position in a binary number represents a power of two rather than ten, and so we call it base 2.
To read a binary number, you start from the rightmost digit and assign powers of two to each position. For example, the binary number 1011 can be broken down as follows: the rightmost digit represents 2°, the next represents 2¹, then 2², and lastly the leftmost digit 2³. You multiply each digit by its corresponding power of two and add the results. In this case, 1011 translates to:
1×2³ + 0×2² + 1×2¹ + 1×2°
which equals 8 + 0 + 2 + 1, or 11 in decimal form.
This method of reading binary can be applied to any binary number. The more digits there are, the larger the number it can represent. For example, an eight-digit binary number can represent values from 0 to 255, which is why you often see numbers in that range in computing contexts like IP addresses or color codes.
The Punchline
Reading binary becomes easier with practice. Once you’re familiar with the powers of two and their sequence (1, 2, 4, 8, 16, 32, and so on), you can quickly convert binary numbers to decimal and vice versa. So now, going back to our little quip saying there are 10 types of people in the world, the joke is that the number 10 is also the number 2 written in binary! Or, mathematically speaking, 10 translates to:
1×2¹ + 0×2°
which is 2 + 0, or just 2.
And there you have it! Welcome to the “in” crowd!