Binary numbers are essential to computing, as all the data that runs through your phone or PC is in binary. But since humans don’t naturally use the binary number system, it can be hard to understand.

Let’s explore what binary is. By the end, you’ll know how binary differs from our usual system of counting, how binary numbers work, what “32-bit” and “64-bit” mean, and why this all matters.

Understanding Base 10: Decimal

Before we examine binary, it helps to consider the numeral system that the modern world uses. Decimal, or base 10, is a system where each possible place in a number can be one of 10 digits.

To express a single-digit number in decimal, we use the numerals 0 through 9. To go higher than that, we add another place, going up to 10, 100, 1,000, and beyond. For example, writing out the number 1972 represents the following when broken down:

1,000

100

10

1

1

9

7

2

Thus, the number 1972 consists of 1x1000, 9x100, 7x10, and 2x1. Since you’ve used this system since you were a child, it’s how you think of numbers.

Binary is a different way to approach numbers—the value doesn’t change, but the way we represent it does.

Counting in Base 2 With Binary

Binary is a counting system that uses only two numbers for each place: 0 and 1. Binary is also known as “base 2.” In binary, to represent a higher number than 1, you need a second place.

While each additional place in decimal is multiplied by 10, each additional place in binary is multiplied by 2. Thus, as you add units in binary, they are represented like this, counting from right to left from the first 10 places:

512, 256, 128, 64, 32, 16, 8, 4, 2, 1

In other words, the right-most value in a binary number represents how many 1s there are. The digit to its left represents how many 2s, the next how many 4s, and so on. Those values might look familiar as the storage options available on phones and other media—that’s where they come from.

Writing out numbers in binary helps a lot with understanding them, since it’s not a natural way of counting for us. See the below chart to illustrate binary counting:

Decimal Value

128

64

32

16

8

4

2

1

0

0

1

1

2

1

0

3

1

1

4

1

0

0

5

1

0

1

6

1

1

0

7

1

1

1

8

1

0

0

0

9

1

0

0

1

10

1

0

1

0

11

1

0

1

1

12

1

1

0

0

13

1

1

0

1

14

1

1

1

0

15

1

1

1

1

16

1

0

0

0

0

17

1

0

0

0

1

18

1

0

0

1

0

19

1

0

0

1

1

20

1

0

1

0

0

21

1

0

1

0

1

22

1

0

1

1

0

23

1

0

1

1

1

24

1

1

0

0

0

25

1

1

0

0

1

26

1

1

0

1

0

27

1

1

0

1

1

28

1

1

1

0

0

29

1

1

1

0

1

30

1

1

1

1

0

31

1

1

1

1

1

...

254

1

1

1

1

1

1

0

1

255

1

1

1

1

1

1

1

0

256

1

1

1

1

1

1

1

1

Take a moment to look at the table and make sure you understand the idea. When you look at the decimal number 25, for example, you should be able to break its binary counterpart (11001) down to 16 + 8 + 1.

Converting From Binary to Decimal and Vice-Versa

To figure out what a binary number is in decimal, you can draw out a chart like the above. It’s slow, but will help you check this reliably.

After spending some time with binary, you’ll be able to calculate small values in your head. For example, if you see the number 1101001, you can work through it by adding 1, 8, 32, and 64 for a total of 105.

Going from a decimal number to a binary number is different. To do this, you should first figure out the largest binary unit that fits into your number. For example, if you want to know what 73 is in binary, the largest binary value that’s under this is 64, so the 64’s place is a 1.

The difference between 73 and 64 is 9, meaning we need a 1 in the 8’s place and a 1 in the 1’s place to make 9. Putting this all together, the binary value for 73 is 1001001.

As you get used to the places, you’ll be able to perform these calculations more quickly. However, anything beyond 512 or 1,024 becomes difficult to work with manually.

When working with larger numbers, tools like the Programmer calculator in Windows and macOS will help. These let you type a number in decimal and see its equivalent in binary (or vice-versa). There’s also a handy bit-toggling mode, which lets you click individual binary digits on and off to see the value update in real time.

Windows Calculator Binary Mode

Bits, Bytes, and Larger Units

We use certain terms to refer to the size of binary numbers. A single digit is a bit; as we saw above, a single bit can represent only 1 or 0 on its own. This is enough to store a Boolean variable, where 0 is false and 1 is true.

Eight bits together are known as a byte, which is the smallest amount of memory that most computers can work with. With one byte, you can represent the decimal numbers 0 through 255, which is 256 possible values.

To count higher binary numbers in the realm of modern storage sizes, we use standard SI prefixes like kilo-, mega-, and giga-. A kilobyte is one thousand bytes, a megabyte is one million bytes, and a gigabyte is one billion bytes. This continues with terabytes and beyond.

Confusingly, since we measure these sizes in decimal while computers measure them in binary, you’ll sometimes find that a device has less storage than it advertises. Our explanation of hard drive size discrepancies explains why this happens in detail.

How Binary Is Used in Practice

Bytes are an important point of reference. In early computers, one byte was used to hold a single text character.

Many early video games limited certain counters to 255 for the same reason. For example, arcade games like Pac-Man crash after level 255 because the game runs out of memory. In the original Zelda on NES, the maximum amount of rupees (the game’s currency) is 255, because one byte is all the game uses to store that number. With limited memory, the programmers didn't want to allocate any more space to these values, since there are many other factors to account for.

You can apply this concept anywhere you hear the term “bit.” As another illustration, the differences between a 32-bit and 64-bit operating system come down to how much memory the system can address. A 32-bit system supports the addressing of four bytes, or 256^4, meaning it has roughly 4 billion bytes (4GB) for possible memory addresses. This is why a 32-bit OS can’t use more than 4GB of RAM.

Meanwhile, a 64-bit OS has 256^8, or roughly 18 quintillion, possible addresses. This is a number beyond human comprehension, meaning the RAM limit is far beyond anything we use now.

Similarly, IPv4 addresses consist of four bytes (each digit in an address, like 192.168.100.47, can be anywhere from 0 to 255). There are many more than four billion internet-connected devices online today, which is why we’ve run out of IPv4 addresses. The world is slowly moving towards IPv6, which has the same much higher limit.

Now that you understand binary, you can see why the same numbers (powers of 2) appear when discussing it. Anytime you assign a number of bits for a value in computing, you have a finite number of options for it. Values that were chosen long ago due to limitations of the time, when reaching the maximum was unthinkable, have created limits for more powerful machines today.

Think Like a Computer With Binary

While this is an introduction to binary, there’s a lot more to explore if you’re interested. For instance, those who work with binary often prefer the hexadecimal system (base 16) instead of decimal, since 2 and 16 have many more multiples in common than 2 and 10. And representing negative numbers in binary comes with separate concerns.

But the above serves as a good overview of how binary is the underlying counting system in computers and how that manifests. Going deeper, you might also dig into how computers run code.