Binary Information
(Bits and Bytes)


Perhaps the best way to illustrate binary numbers and how they carry information is to start with the following hypothetical situation:

Suppose you've got one of those dimmer switches you use to light a room. Like this...


dimmer
switch

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

255 Watt
light bulb

And of course you can get any Wattage of light from 0 watts to 255 watts by turning the dial:


dimmer
switch

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

8 Watts

Now suppose that one day you really liked the lighting you had in the room and you would like to be able to reproduce it exactly later. What can you do? Well you could mark where you had the dial with tape or something. Are you going to get it exactly every time this way. Well you say "It's close enough". Okay, but now suppose you would like to call a friend across the country and tell him about your lighting preference. So you would like to tell him exactly where you have the dial set. Hmmm?

One solution to this kind of problem is to have different kind of variable lighting -- say a digital lighting system. Here's how it works:

suppose we start with a 1 watt bulb and then get another bulb that has double the wattage a 2 watt bulb and double that one a 4 watt bulb and so on. You end up with 8 different bulbs of the following wattages....1 Watt, 2 Watt, 4 Watt, 8 Watt, 16 Watt, 32 watt, 64 watt, and 128 Watt. In the following configuration notice that by clicking these bulbs on and off we can get every whole number wattage from 0 to 255!


128 W
on
off

64 W
on
off

32 W
on
off

16 W
on
off

8 W
on
off

4 W
on
off

2 W
on
off

1 W
on
off
= WATTS


For instance, if we want to get 171 Watts we would turn on the 128 watt, 32 watt,8 watt, 2 watt , and 1 watt.

On your own try to turn the correct bulbs to get 137 watts.

Now let's come up with a good way to keep records of the different lighting levels we like. I know! Let's use a 1 to designate that the light is on and a 0 when a light is off. So for instance our 171 watts would be designated as 10101011. So now when you call your friend across the country you can tell him you like your lights set at 10101011. This is a binary reprentation of 171.

Now use the diagram below to figure out the binary representation of 137.

notice the 1's and 0's ---->


128 W
on
off


64 W
on
off


32 W
on
off


16 W
on
off


8 W
on
off


4 W
on
off


2 W
on
off


1 W
on
off

= WATTS


Now with a combination of 1's and 0's we can accurately store information. This is exactly how computers store information. The information of either 0 or 1 is called a bit. That is, a bit can be either 0 or 1. Our lighting system has 8 bits. And it turns out that 8 bits is a byte. (perhaps you've heard of a byte? For instance the amount of information that your hard drive can hold is in MegaBytes (millions of bytes).)

So that we can store words, we can assign a unique byte to each Latin character. Look at the following table:
a 9701100001
b 9801100010
c 9901100011
d 10001100100
e 10101100101
f 10201100110
g 10301100111
h 10401101000
i 10501101001
j 10601101010
k 10701101011
l 10801101100
m 10901101101
n 11001101110
o 11101101111
p 11201110000
q 11301110001
r 11401110010
s 11501110011
t 11601110100
u 11701110101
v 11801110110
w 11901110111
x 12001111000
y 12101111001
z 12201111010

The first column is, of course, the letter. The second column is the decimal representation assigned to the letter. Finally, the third column is the binary representation of the letter.

This designation is a part of the standard for converting text to binary called ASCII (or ASCII code). Of course there are many more letters and symbols we have only listed the lower case letters here. ASCII stands for:
A = American
S = Standard
C = Code for
I = Information
I = Interchange

ASCII is used to convert all of the characters you type into binary information so the computer can understand use it. Here is the binary representation of phrase -- math teacher link, ( BTW a space is 32 or 00100000):

01101101 0110001 01110100 01101000 0010000 01110100 01100101 01100001 01100011 01101000 01100101 01110010 0010000 01101100 01101001 01101110 01101011

(Later, as a challenge we'll ask you to spell your name in binary using the ASCII code.)

Besides Accurately storing information binary information is easy for machines to manipute and perform operations on and with. In the Next Section we'll see how a machine can ADD two numbers together using their binary representation.