How Does the Binary System Work: An Introduction
March 20, 2007 by Kiltak |
Before you start reading this article, I want you to take a trip back into your past when you were being taught the decimal system. Personally, when I was in elementary school (in the 70’s/80’s), teachers used to use a column system to teach us about numbers:
[Thousands] | [Hundreds] | [Tens] | [One]
1 2 3 4
The number 1234 is - 1 Thousands, 2 Hundreds, 3 Tens and 4 Ones.
A few years later, we learned about the composition of the decimal system in a more complex way.
Thousands became 10^3 (10*10*10)
Hundreds became 10^2 (10*10)
… and so on.
1234 then became:
((1*10^3)+(2*10^2)+(3*10^1)+(4*10^0))
As you already know, counting in decimals is done by using 10 digits, from 0 to 9. Each time we jump a “column” (from 9 to 10), we add 1 digit to our total and reset all subsequent numbers to 0 (999 becomes 1000). The binary system works exactly the same way, but instead of using digits that goes from 0 to 9, we keep things simple and only use 0’s and 1’s, just like computers do. But the question you are probably asking yourself now is why do computers only use 0’s and 1’s? The answer is simple: electronic circuits. Circuits that make the wheel inside your computer turn can only have 2 states, on and off. Since a computer is mostly made out of electronic circuitry, it is logical that it uses the binary system to send, receive or compute information.
How does the binary system work?
Let’s start with what a binary number looks like:
01001010
“What the heck does this mean, and how do I represent this in more familiar decimal format” you ask. First, you have to know that each digit of a binary number is based on 2 to the power of x (as opposed to the decimal system that is based on the number 10). Here is a quick and easy chart you should study before continuing:
2 to the power of 0 = 1 (2^0)
2 to the power of 1 = 2 (2^1)
2 to the power of 2 = 4 (2^2) or (2*2)
2 to the power of 3 = 8 (2^3) or (2*2*2)
2 to the power of 4 = 16 (2^4) or (etc.)
2 to the power of 5 = 32 (2^5)
2 to the power of 6 = 64 (2^6)
2 to the power of 7 = 128 (2^7)
2 to the power of 8 = 256 (2^8)
…
2 to the power of x = (2^x)
Ok, let’s apply this chart to the binary number I gave a few moments ago to get us the decimal equivalent. All digits that are 0 remain 0, and are only useful as position placeholders. All digits that are assigned a value of 1 have a decimal value that is equal to the power (2^x) of their position within the chart.
128 64 32 16 8 4 2 1
————————————–
0 1 0 0 1 0 1 0
01001010 = 64 + 8 + 2
which means that 01001010 = 74
Simple isn’t it?
Now let’s do the inverse. To convert 74 to binary, you’ll have to start by finding the biggest power of 2 that is valued less then 74. Finding this number is important because it will determine the positive value at the left of your binary number. In this case, it is 64.
Let’s put a 1 in the 2^6 (2*2*2*2*2*2 = 64) position.
01000000
After, take your initial decimal number, and subtract it by the value you just found out. 74 - 64 = 10. Now, let’s do the same procedure as before. What is the biggest power of 2 that is valued less then 10? It is 8.
Put a 1 in the 2^3 position ( 2*2*2 = 8 )
…and continue doing this until the total equals your initial decimal number.
01001010
Even numbers always finish with a 0 and odd ones end in 1. This is because the rightmost digit in a binary number can only have a decimal value of 0 or 1.
As a non-IT person, there’s no real reason why you should know about how to do this manually, except to sound smart in front of your peers. Most modern calculators (including the windows one) can also accomplish these operations quickly and painlessly.
So why bother with all this? The answer is simple: Because you’re a geek (or an aspiring one)!
- Binary Marble Adding Machine (Video)
- Articles and Reviews
- The proper way to write a resignation letter
- Binary Adding Machine Built Out Of Wood
Subscribe by Email














I’ve always wanted to get one of those binary watches from thinkgeek, but always told myself, Why the hell would I need that? hehe.
My mom asked why I needed one of these watches and didn’t accept “to tell time” since it’s binary and costs more than a cheap digital does. My dad got it for me for Christmas. Oh, and today I went to dinner with a geek friend who commented on the watch then said he’s looking at one that tells the weather forecast like the little mini weather station on thinkgeek.
[code]74
37 0
18 1
9 0
4 1
2 0
1 0
0 1[/code]
You then start at the bottom of the right column and read the binary digits upward, in this case getting ‘1001010′.
7437 0
18 1
9 0
4 1
2 0
1 0
0 1
It takes a little effort to know it perfectly but I can see their advantage.
This article doesn’t explain all of the binary system’s purpose but for curiosity it’s ok.
You should try to explain the octal and the hexadecimal system as well, just for fun.
Why should you do this? The answer is simple: because we are all geeks
Way to go Mac!
That said, there is nothing sacred about 2 state (binary) logic.
Every so often, someone decides to do a trinary (or more) logic element (say an SRAM bit cell). This seems like a great idea, because you can now hold “more” data (3 states instead of 2) in roughly the same amount of expensive silicon area (~ $1 per square millimeter, or about $4 billion per acre). The problem is that you now have to distinguish between three states, not two, and your errors in storing and sensing are now a much larger percentage of your valid signal range for each one of your states. Each state now only has 0.33V of valif range, so now your 0.35V of noise means you can no longer decide which state a given signal is in. This is why the industry keeps coming back to binary systems.
To me, this signal to noise concept of only needing to make a simple this OR that decision is the basis of all the digital revolution - if you can cleanly get your quantities digitized, then they are EXTREMELY stable in the presence of noise, because a clean 1 or 0 can be “easily” regenerated even if noise is added.
It was a fun conversation.
01100100 - 100
is that right?
01100010 01101001 01101110 01100001 01110010 01111001 01110111 01101111 01101100 01100110