What is Binary?
You use Binary every day without even knowing. Every time you type on your keyboard. Every time you send a text message. Every time you turn a light switch on or off. Binary is all around us... it's up to us to spot it.
As with most concepts, once you understand the basics, the concept will become much clearer. And with that said, before we jump right into Binary, a brief discussion of bits and bytes is in order.
A Primer on Bits and Bytes as Related to Binary
The most basic unit of data on a computer is a bit. And a bit is simply a one or a zero. In human terms, a bit is either used or not used; there is no in-between. In other words:
|bit = 1||bit = 0|
Are you seeing a pattern? Each of the above examples is a system of two. No more. No less. And when you look at the definition for Binary, you can see that Binary is a system consisting of two units. We’ll come back to this in a moment.
Groups of Bits make up a Byte
When 8 bits are grouped together, it is then known as a byte. And bytes are what computers use to represent various characters such as those you see on your keyboard.
For example, when a computer needs to represent a number or a letter in the alphabet, it will group 8 bits together to make a single byte. Remember: a bit can only be a 1 or a 0, so a group of eight 1's and 0's will be a single byte.
You should see a pattern where each item in the above sequences are a single bit different than the previous one.
This is true for any Binary sequence. Whether it be numbers, upper case letters, lower case letters or any other alpha-numeric sequence. The caveat here is that you have to read the binary from right to left. Now do you see the pattern? If not, hover your mouse over the table and the pattern will highlight for you.
One final note before moving on... you may be wondering what the number 10 would be in the next sequence of Binary? Here's a hint: the number 10 will be a combination of two bytes (2 bytes = 16 bits).
Base 2 Mathematics
The pattern you’re seeing is not by coincidence; there is a very logical mathematical reason which brings us back to the construct of two. This construct of two is also known as Base 2 mathematics where only two units are used and everything is based on the power of 2 for each of the 8 possible bits in a single byte:
|20 = 1||(any number to the power of 0 = 1)|
|21 = 2||(any number to the power of 1 = itself)|
|22 = 4||(2 x 2 = 4)|
|23 = 8||(2 x 2 x 2 = 8)|
|24 = 16||(2 x 2 x 2 x 2 = 16)|
|25 = 32||(2 x 2 x 2 x 2 x 2 = 32)|
|26 = 64||(2 x 2 x 2 x 2 x 2 x 2 = 64)|
|27 = 128||(2 x 2 x 2 x 2 x 2 x 2 x 2 = 128)|
Great, but what does this have to do with Binary?
Remember that we said Binary is a system consisting of two units? And we just said our pattern uses Base 2 mathematics? Well, here is where everything begins to merge into a larger pattern; and don’t forget to read from right to left which means the lowest Base 2 value will be on the right, while the highest value will be on the left.
|1 in Binary||0||0||1||1||0||0||0||1|
|base 2 value||0||0||32||16||0||0||0||1|
|sum||0 + 0 + 32 + 16 + 0 + 0 + 0 + 1 = 49|
The above table represents how the number 1 (one) is interpreted in a mathematical pattern using Base 2 mathematics and Binary values. Since the Binary value will tell us if the Base 2 number is used, all we have to do is add up all the "On" values to come up with our unique number that defines the number 1 (one): 49.
Perhaps a larger sequence of this pattern will help. Extra credit: can you find the pattern when comparing Upper Case letters and Lower Case letters?
|1 in Binary||0||0||1||1||0||0||0||1|
|2 in Binary||0||0||1||1||0||0||1||0|
|3 in Binary||0||0||1||1||0||0||1||1|
|4 in Binary||0||0||1||1||0||1||0||0|
|5 in Binary||0||0||1||1||0||1||0||1|
|6 in Binary||0||0||1||1||0||1||1||0|
|7 in Binary||0||0||1||1||0||1||1||1|
|8 in Binary||0||0||1||1||1||0||0||0|
|9 in Binary||0||0||1||1||1||0||0||1|
|0 in Binary||0||0||1||1||0||0||0||0|
|A in Binary||0||1||0||0||0||0||0||1|
|B in Binary||0||1||0||0||0||0||1||0|
|C in Binary||0||1||0||0||0||0||1||1|
|D in Binary||0||1||0||0||0||1||0||0|
|E in Binary||0||1||0||0||0||1||0||1|
|F in Binary||0||1||0||0||0||1||1||0|
|G in Binary||0||1||0||0||0||1||1||1|
|H in Binary||0||1||0||0||1||0||0||0|
|I in Binary||0||1||0||0||1||0||0||1|
|J in Binary||0||1||0||0||1||0||1||0|
|a in Binary||0||1||1||0||0||0||0||1|
|b in Binary||0||1||1||0||0||0||1||0|
|c in Binary||0||1||1||0||0||0||1||1|
|d in Binary||0||1||1||0||0||1||0||0|
|e in Binary||0||1||1||0||0||1||0||1|
|f in Binary||0||1||1||0||0||1||1||0|
|g in Binary||0||1||1||0||0||1||1||1|
|h in Binary||0||1||1||0||1||0||0||0|
|i in Binary||0||1||1||0||1||0||0||1|
|j in Binary||0||1||1||0||1||0||1||0|
We've covered quite a bit in a short amount of time here. Perhaps now would be a good time to take a break and ponder what we've learned for awhile.
In the next article, the Smuggler will dive deeper into Binary. In the meantime, if you have any questions or comments, feel free to post them on the Word Smuggler Facebook page. Until next time...
All the best,
The Word Smuggler