# How Does the Binary System Work: An Introduction

----------------

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]

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?

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)!

----------------------------

## 102 Responses to How Does the Binary System Work: An Introduction

1. Ah, memories of 6th grade where we were required to learn base 3, but had binary for the bonus question…I get a lot of funny looks because I wear a binary watch and few other people can read it. On the other hand, if someone (like the snowboarder whose board said 1337) wants to test my geek-level and asks if I know binary, I just hold out my arm and don't say a word.

• Uh? You learned base 3 in grade 6? Hehe, I'm sure it won't be long until schools start teaching octal in grade one :)

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.

• You should be so lucky… Know anything about Greek mythology?

2. My husband is a psychologist – I've always thought it would be fun to put a binary clock in his office. Talk about messing up the client!

3. My husband is a psychologist – I’ve always thought it would be fun to put a binary clock in his office. Talk about messing up the client!

4. Haha, wouldn't that be hilarious? They come out of his office needing more counseling then when they first got in.. a great "get rich quick" recipe :)

5. Haha, wouldn’t that be hilarious? They come out of his office needing more counseling then when they first got in.. a great “get rich quick” recipe :)

6. Ah, memories of 6th grade where we were required to learn base 3, but had binary for the bonus question…I get a lot of funny looks because I wear a binary watch and few other people can read it. On the other hand, if someone (like the snowboarder whose board said 1337) wants to test my geek-level and asks if I know binary, I just hold out my arm and don’t say a word.

7. Yeah, base 3 was required in 6th grade math class, but when I tried to explain my watch to an old schoolmate she didn't get it. She doesn't remember learning tertiary, but then it's been 7 years.

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.

8. Yeah, base 3 was required in 6th grade math class, but when I tried to explain my watch to an old schoolmate she didn’t get it. She doesn’t remember learning tertiary, but then it’s been 7 years.

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.

9. Okay so my vocabulary is wrong. Base 3 = ternary, not tertiary.

10. Okay so my vocabulary is wrong. Base 3 = ternary, not tertiary.

11. Pingback: jWanderings

12. Sean says:

Many years ago, I learned a method of converting from decimal to binary that didn't depend on your being able to calculate or reference powers of two; the only math that it required was being able to divide by two and tell the remainder. What you did was to take the number and repeatedly divide it by two, writing the remainder to one side, until you reached a value of 0:

[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'.

13. Sean says:

Many years ago, I learned a method of converting from decimal to binary that didn’t depend on your being able to calculate or reference powers of two; the only math that it required was being able to divide by two and tell the remainder. What you did was to take the number and repeatedly divide it by two, writing the remainder to one side, until you reached a value of 0:
[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’.

14. Sean says:

Aargh. Too much time with BBCode, and no preview function.

<code>74

37 0

18 1

9 0

4 1

2 0

1 0

0 1</code>

• That's how my computer science teacher taught it in 10th grade. I still like the powers of two way because if you've been around a computer for a bit, you know the pattern 2 4 8 16 32 64 128 256 512 1024 2048 just from buying RAM. I like subtraction. It's easier than division.

15. Sean says:

Aargh. Too much time with BBCode, and no preview function.
```74 37 0 18 1 9 0 4 1 2 0 1 0 0 1```

• That’s how my computer science teacher taught it in 10th grade. I still like the powers of two way because if you’ve been around a computer for a bit, you know the pattern 2 4 8 16 32 64 128 256 512 1024 2048 just from buying RAM. I like subtraction. It’s easier than division.

16. Pingback: links for 2007-03-21 at Baron VC

17. As a Engineer of Electronic and Computer's student the binary system was obviously one of the numerical systems I had to learn.

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 :D

• i totally agree with you. I think we should study the octal and haxadecimal part of the binary system just for fun.

Because this is what we are and what we will fight for…the geek's right to have fun.

18. As a Engineer of Electronic and Computer’s student the binary system was obviously one of the numerical systems I had to learn.

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 :D

19. As a Engineer of Electronic and Computer’s student the binary system was obviously one of the numerical systems I had to learn.

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 :D

20. Brandon says:

Hey, i need to figure out how to turn the words into numbeers for example turning my name Brandon into its binary code that would help me out alot if someone could email at Nova73rs@aol.com that would help me a whole lot thanks

• Go to asciitable.com and look up the decimal ascii value of each letter. Convert each to 8-bit binary (each will start with a 0), and line them up together. I know a space is 32 so that's 01000000

• I couldn't have said it better :)

Way to go Mac!

• (srry to correct you, but 32 is: 0100000, you had 1 extra 0 lol.)

21. Brandon says:

Hey, i need to figure out how to turn the words into numbeers for example turning my name Brandon into its binary code that would help me out alot if someone could email at Nova73rs@aol.com that would help me a whole lot thanks

• Go to asciitable.com and look up the decimal ascii value of each letter. Convert each to 8-bit binary (each will start with a 0), and line them up together. I know a space is 32 so that’s 01000000

• I couldn’t have said it better :)

Way to go Mac!

• (srry to correct you, but 32 is: 0100000, you had 1 extra 0 lol.)

22. Brandon says:

I got it thank you lots im not very good at math its a bad subject for me ;(

23. Brandon says:

I got it thank you lots im not very good at math its a bad subject for me ;(

24. Brandon says:

Do they change for lower case and uppercase?

• Yes, the ascii value for Upper and Lower case are not the same… everything is in the link Mac provided..

25. Brandon says:

Do they change for lower case and uppercase?

26. Brandon says:

Do they change for lower case and uppercase?

• Yes, the ascii value for Upper and Lower case are not the same… everything is in the link Mac provided..

• Yes, the ascii value for Upper and Lower case are not the same… everything is in the link Mac provided..

27. JimG_in_Austin says:

One perhaps little-appreciated aspect of binary numbers is WHY they are used. Essentially, it comes down to noise margin – when there are only two choices (1 and 0), you have the largest possible range of valid state. For example, if the memory element power supply is at 1 Volt, then any stored signal below 0.5V is a '0' and anything above is a '1", so each has a valid range of 0.5V. If you have noise/error/uncertainty of 0.35V, say, you can still tell that a 0 is a 0 (0V-0.35V), and a 1 is a 1 (1.0V to 0.65V) Also, you know that if it is not ONE of the states, then it can ONLY be the other.

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.

28. JimG_in_Austin says:

One perhaps little-appreciated aspect of binary numbers is WHY they are used. Essentially, it comes down to noise margin – when there are only two choices (1 and 0), you have the largest possible range of valid state. For example, if the memory element power supply is at 1 Volt, then any stored signal below 0.5V is a ‘0’ and anything above is a ‘1″, so each has a valid range of 0.5V. If you have noise/error/uncertainty of 0.35V, say, you can still tell that a 0 is a 0 (0V-0.35V), and a 1 is a 1 (1.0V to 0.65V) Also, you know that if it is not ONE of the states, then it can ONLY be the other.

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.

29. Mariana says:

I have a question. In the number 01001010, why is there a zero at the beginning? Why is it important to say that there is no 128 in this number? Why isn’t there another 0 to say there is no 256? Do all binary numbers have a 0 at the beginning?

• You don’t actually need the leading zero to represent the number in binary. But most uses of binary are in computer “words” that are a multiple of 8 “bits” (which make a “byte”). In this case, eight digits are represented, because it’s the smallest multiple of 8 bits into which the number fits.

30. Mariana says:

I have a question. In the number 01001010, why is there a zero at the beginning? Why is it important to say that there is no 128 in this number? Why isn't there another 0 to say there is no 256? Do all binary numbers have a 0 at the beginning?

• You don't actually need the leading zero to represent the number in binary. But most uses of binary are in computer "words" that are a multiple of 8 "bits" (which make a "byte"). In this case, eight digits are represented, because it's the smallest multiple of 8 bits into which the number fits.

31. Eventually I may take the time to actually learn this. 3:30 AM is not a good time for learning binary. My boyfriend tried to teach it to me a couple of years ago, but I didn’t get it, so instead we figured out how much energy was in each one of our meals (we were at McDonald’s), and how long each meal would power a standard 70 watt lightbulb.

It was a fun conversation.

32. Eventually I may take the time to actually learn this. 3:30 AM is not a good time for learning binary. My boyfriend tried to teach it to me a couple of years ago, but I didn't get it, so instead we figured out how much energy was in each one of our meals (we were at McDonald's), and how long each meal would power a standard 70 watt lightbulb.

It was a fun conversation.

33. Emilovespeteandbowwow!!! says:

binary is hard i have to do a assignment on it can anyone tell me what the binary number 4 35 and 100 is??

• not sure says:

00100011 – 35
01100100 – 100

is that right?

• Yep, right on :)

34. Emilovespeteandbowwo says:

binary is hard i have to do a assignment on it can anyone tell me what the binary number 4 35 and 100 is??

• not sure says:

00100011 – 35

01100100 – 100

is that right?

• Yep, right on :)

35. Position of letters in the alphabet:

01100010 01101001 01101110 01100001 01110010 01111001 01110111 01101111 01101100 01100110

36. Position of letters in the alphabet:
01100010 01101001 01101110 01100001 01110010 01111001 01110111 01101111 01101100 01100110

37. Julia says:

Thank you so much for this comment i have been trying to find a comprehensive definition for the binary system all day. your's is easy to understand and yes I AM A GEEK!

38. Julia says:

Thank you so much for this comment i have been trying to find a comprehensive definition for the binary system all day. your’s is easy to understand and yes I AM A GEEK!

39. Isn't it pretty embarrassing to have a "geek" site where you have a tutorial in binary? It is directly analogous to having a "English Lit. Grads" site where you have an introduction to pronouns and adjectives.

• Not really. We like to help non-geeks become just a bit geekier, so why not? :)

• PastorDIC says:

Ok Ubergeeks. Maybe this will be more challenging for you. I know someone who gave me a puzzle I can't seem to solve. He gave me a set of numbers that are supposed to be equivelant to coordinates to somewhere in SW WA. His only hint was "think binary". Here are the numbers:

101, 333, 57, 2039, 6943, 123, 2048

2048, 4352, 65, 2060, 11707, 6712, 127, 1126

So how do I solve this?

• bethany says:

whats wrong with bieng a geek

40. Isn’t it pretty embarrassing to have a “geek” site where you have a tutorial in binary? It is directly analogous to having a “English Lit. Grads” site where you have an introduction to pronouns and adjectives.

• Not really. We like to help non-geeks become just a bit geekier, so why not? :)

• Harley7446 says:

you guys make mmy head hurt,i don`t get it at all,and i consider myself to be above average intelligence.i really don`t undertand at all.but i am forty and i was the last class to not have computers in school.never saw one the entire time i was in school.it seems the next year they were everywhere,i graduated in `88 from a very good school.i just don`t understand binary and i would like to,because i like to be able to hold myself in a conversation about anything,i am self-taught,which i am thankful for,because i didn`t have a liberal idealogy burned into my head.but i will keep reading up on this,it really interests me.

• PastorDIC says:

Ok Ubergeeks. Maybe this will be more challenging for you. I know someone who gave me a puzzle I can’t seem to solve. He gave me a set of numbers that are supposed to be equivelant to coordinates to somewhere in SW WA. His only hint was “think binary”. Here are the numbers:

101, 333, 57, 2039, 6943, 123, 2048

2048, 4352, 65, 2060, 11707, 6712, 127, 1126

So how do I solve this?

• i think i read this in a book somewhere……ill get back to you

• Mitchell schooler says:

45 degrees N 122 degrees W

But its in Oregon. Close enough.

you really should learn how to use google, its a lifesaver

• bethany says:

whats wrong with bieng a geek

41. bender says:

awwww man mac is gone :(

42. bender says:

awwww man mac is gone :(

43. bender says:

wow this won't stop till end of the world :P

44. bender says:

wow this won’t stop till end of the world :P

45. Wow, great resource. I honestly have wondered how this worked.

46. Wow, great resource. I honestly have wondered how this worked.

47. manasi patel says:

i have another trick for count he binary.
frist take a number and divide it and start from 2 and take seprate carry their is the number

48. manasi patel says:

i have another trick for count he binary.

frist take a number and divide it and start from 2 and take seprate carry their is the number

49. Michael says:

What do you do if you have a number bigger than 255?
0_o

• billy says:

“What do you do if you have a number bigger than 255?
0_o”

huh? if n>255 just use 256, double it everytime reach a new high. 100000000

50. Michael says:

What do you do if you have a number bigger than 255?

0_o

• billy says:

"What do you do if you have a number bigger than 255?

0_o"

huh? if n>255 just use 256, double it everytime reach a new high. 100000000

51. umm can you guys help me out im not sure if you read it like a backwards book or something haha sorry im not very nerdy (as in smart) i just wanted to bug my freinds by asking binary stuff and is there a way to convert it to letters?

if so plz explain

52. iannoble says:

wow, this was great, got it licked in 10 mins!! thank you thank you thank you!

53. iannoble says:

wow, this was great, got it licked in 10 mins!! thank you thank you thank you!

54. Palle says:

Binary system are the future

55. Palle says:

Binary system are the future

56. HAm says:

u suck people. Whats is wrong with yiou?

57. HAm says:

u suck people. Whats is wrong with yiou?

58. HAm says:

u suck people. Whats is wrong with yiou?

59. Binary is so confusing. The closest I have come to it is having a t-shirt with it on. Yes I know that is sad.

60. Andyonrol says:

for som1 still in school learning this i started under standing like oh oh then it was like
wat

61. Mitchell schooler says:

ok, but how do you figure in letters? do they have number values?

62. I found this very useful. I have been trying to get my head around this for some time. I was always bad at maths. You explain it well. Thanks.