Explaining Binary

Binary. On and off, yes and no, 0 and 1. You know it some way or another. Today, on this page of my website, I will explain the history, its use cases, and how to count in binary.

Before I start with Binary, let’s do a brief history lesson of counting. Base 10 (Decimal System) is what we are normally used to, and it was even known to be used by the Ancient Indians and Egyptians. As it became more widely adopted, it spread to other cultures. The most likely reason it became the way we count is because humans have 10 fingers—or digits—making it easy and convenient. The Decimal System works by only using numbers from 0 to 9, and adding a digit to the left every time you reach a new power of 10. (10, 100, 1,000, 10,000, 100,000, …) We use base systems because, instead of using a brand new symbol for every single number known to man, it is much easier to make them out of a bunch of predefined numbers. 

In Binary, we use only two digits: 0 and 1. Binary digits are evaluated from right to left, and are usually broken up into 8-bit sections, also known as a byte. Since Binary only has two digits, each time you reach a new power of 2, you add another bit to the left. 

If you want to convert Binary to Decimal, it is actually pretty simple.

Binary:   1    0    1    1
Place:   [8]  [4]  [2]  [1]
Math:     1×8 + 0×4 + 1×2 + 1×1 = 11
                                

It’s just a series of multiplication and addition. We multiply each binary digit by its place value, then add them all together. 

EXAMPLE:
1 in binary is 1.
2 in binary is 10 (one two and no ones).
3 in binary is 11 (one two and one one).
4 in binary is 100 (one four, no twos, no ones). 

As in the example, if you run out of digits, add a new digit (bit) to the far left and set the rest to zero. 

EXAMPLE:
15: 1111
16: 10000

There are many different ways binary has its use. I can list a few examples. Morse Code is binary-like, as all it consists of is a series of two different symbols: dot and dash. Imagine a dot as a zero and a dash as a one—BOOM! We have binary!

QR Codes also use Binary, as the way they are encoded is a string of ASCII binary converted into a white or black dot and placed in a table. I have a whole page on QR codes, so if you want to learn more you can check it out!

Computers literally speak through binary. It is their love language and is fundamental to them working. Computers use it to represent and store data. It corresponds to the on and off states of electrical switches inside.

I could go and add more to the list, but I do not want this to be too long. Let’s move on. 

Binary can be represented in the real world as any two things, as long as they are consistent states. This is where we could have some fun! We can make “0” a banana emoji and “1” an apple emoji, and knowing that,

1011 turns to 🍎🍌🍎🍎
            

Isn’t that fun! Binary can convert to many different things, also. Such as ASCII, Decimal, Hexadecimal, and Octal. These are all different, but you can assign a binary string to a specific code in one of those listed.  These are pretty difficult to explain here, so I might have pages explaining them someday, but don’t count on it. 

Counting up in binary, a visualization you could do is imagine you are counting to 10. 


Decimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.
Binary: 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010.

                    

While working with binary may seem confusing at first, understanding that each binary place value represents 2ⁿ—just as each decimal place represents 10ⁿ—can help a lot. For example, let’s pick the number 6. In the decimal number system (base 10), 6 is positioned in the 10⁰ place, which equals 1. Basically, this means:

6 × 10⁰ = 6 × 1 = 6

Now the number 14 for comparison that extends into the tens place:

(1 × 10¹) + (4 × 10⁰) = 10 + 4 = 14

In binary, 4 is represented as “100”. Reading from right to left, the first 0 represents 2⁰, the second 2¹, and the third 2²; it is just like the decimal system, except with a base of 2 rather than 10. Since 2² = 4, a 1 is entered in its position, and we end up with 100. Using 14, or 1110 as an example:

Decimal: 14 = 8 + 4 + 2 = 2³ + 2² + 2¹
Binary: 1110 = (1 × 2³) + (1 × 2²) + (1 × 2¹) + (0 × 2⁰) = 14

The process to convert from the Decimal to the Binary system is:

1. Find the largest power of 2 that is within the given number.

2. Subtract that value, whatever it may be, from the given number.

3. Find the largest power of 2 within the remainder you found in the last step.

4. Repeat this until there is no remainder.

5. Enter a 1 for each binary place value that was found, and a 0 for the others.

There you go!

Binary is so interesting to me, as even with its simplicity it allows for quite a lot of creativity you can add to it, and I think that is pretty cool!