The Problem Site
Membership Options
Member Options
You are currently logged in as .


Login
UserName
Password
Keep me logged in

  

New Member
UserName
Email (optional)
Notify me of new resources

Password
Confirm password

  

Reset Password
Enter your email address below to receive instructions on resetting your account password.

Email address

  

Binary Computer Code


Basic Explanation

Did you know that everything a computer does is based on ones and zeroes? It's hard to imagine, because you hear people talking about the absolutely gargantuan (huge) numbers that computers "crunch". But all those huge numbers - they're just made up of ones and zeros.

It's kind of like the computer is made up of a bunch of lightswitches, and each lightswitch controls just one lightbulb. On or Off. One or Zero. But if you took all of those lightbulbs together, and said "Let's make each sequence of On-and-Off represent a different number!" Well then, you could get some pretty large numbers.

What do I mean by sequence? Let's say you had two lightswitches. There are four different ways we could flip those switches:

Both Off
First Off, Second On
First On, Second Off
Both On

Binary Code takes each of those combinations and assigns a number to it, like this:

Both Off = 0
First Off, Second On = 1
First On, Second Off = 2
Both On = 3

Intermediate Explanation

Another way of thinking about it is this: let's give each lightbulb a point value. We'll say the first lightbulb is worth two points, and the second one is worth one point. Now take a look at the combinations:

Both Off = 0 + 0 = 0
First Off, Second On = 0 + 1 = 1
First On, Second Off = 2 + 0 = 2
Both On = 2 + 1 = 3

If we added in another lightbulb, we would make it worth twice as many points as the 2 pointer. Then, if all the bulbs were on, the point value would be 4 + 2 + 1 = 7. And if we added in another bulb, we would make it worth 8 points (twice as much as four). Now if they are all turned on, that's worth 8 + 4 + 2 + 1 = 15. As you can see, it's going to take a lot of lightbulbs to make a really big number!

Finally, even though we're giving point values to each of those lightbulbs, when we write them down we still only write them as ones and zeros. One means On, and Zero means Off.

So let's say we had 8 lightbulbs, and they were set up like this:

Off Off On On Off On Off Off.

The point values of those eight bulbs are:

0 + 0 + 32 + 16 + 0 + 4 + 0 + 0 (remember - we only give points if they're turned on!)

And that adds up to 52. So we would say the sequence of bulbs is worth 52. But how do we write it? We write it like this: 00110100

So now we can say 00110100binary = 52.

And that's Binary Code.



Binary Encoder


Go ahead and enter some text into the encoder. The computer will convert those letters into numbers, and then it will convert those numbers into binary! Did you know that to write any letter on the computer, it takes 8 "lightbulbs"? So a word with 5 letters would take 40 lightbulbs! How many lightbulbs do you think it took to make this page? I bet it was a lot!

Questions

  1. What are the two numbers that computers understand?
  2. If those two numbers are represented by lightbulbs, what is the value assigned to a bulb that is not turned on?
  3. What would be another way to write this: On Off On On Off?
  4. What is the value of the binary number 101?
  5. If you convert your name to binary using the encoder, what is the result?
  6. If you convert a 5-letter word to binary, how many digits does the result have?
Answer the
questions


Click here for details

POPULAR PAGES TO TRY

A Junior Edition game involving estimation
Yes, the computer cheats...but how?
Print your own worksheets
Reveal the picture by finding the word
 
Get alerts about new resources
Share this Page
Assign games and activities to students!

Approved Sites

Your personal hiking journal online!
Affordable proofreading services
Pentomino, triomino and more puzzles
Advice, humor and warnings about spam
Submit your site for review
Problem writer for math competitions
Home     School work     All Games     Most Popular     Problems     ?????     Contact     About     Privacy Policy
Student Input
 
Cancel