Switching on and off (Operations with Binary Information)
Besides being an accurate way to store and transfer information, Binary
numbers are easy to perform operations on and with. After all, since we
can represent a 1 as meaning on and 0 as meaning off, all we need to do is turn things on and off to make changes
and perform operations on binary information.
Perhaps the best way illustrate how this is done is by showing how by just turning buttons on and off we can add two binary numbers together.
First binary number:
01001101
Second binary number:
00111101
For illustration purposes let's go back to the lighting system we come up with in the last section.
Here are the same binary numbers with the associated lights. Remember 1 means on and
0 means off.
Here is the first binary number (with the lights):
Here is the second binary number (with the lights):
Our goal is to add these together. Adding binary numbers is somewhat like
adding the decimal numbers you are used to. Recall that the way they taught you
to add big numbers in elementary school. You know -- "the Carry Method". You
put each number in a row on top of the other and you carry a "1" if the sum is
greater than or equal to "10". For instance if you were to add 149 and 123.
You could do something like this:
1 123 +149 ------- 272
Below is the MTL Number Adding Computer (MTLNAC). It's actually just a picture
of it. You will have a chance to use it in a little bit. For now, this is a picture of the computer
after it has added the binary numbers 01001101 and 00111101. The
first row is the number 01001101 and the second row is 00111101 and the bottom row is
is the sum. Take a look
at it and I'll explain more below.
The part that looks like this,
is "computer" that has the switches and will help give us the sum. The bottom row
is the actual sum. Notice that there are switches (green means on and
red means off). The smaller
lights on top are called the carry bits.
Finally, the bottom part,
The problem with the MTLNAC is that it doesn't have any brains. YOU are the brains
of the MTLNAC. Below is an actual copy of the MTLNAC. Notice that you can
click on the red buttons and that you can change the numbers under the light
bulbs. Change some of the 0's to 1's for instance. We'll show you exactly how to use it below.
Instructions for Using the MTLNAC:
Just like when you add columns of decimal number with the MTLNAC adder you
add the right most columns first, and work your way to the left. What do I mean
by a column? The following is a column:
To use the MTL computer, you need only know two rules:
These rules apply to each column:
If ONE or THREE lights in a column are ON, then click the right button on.
if TWO or THREE lights in a column are ON, then click the left button on.
For instance, here are some examples:
1 light on:
Right button ON
2 lights on
left button ON
3 lights on
Both buttons ON
Now it is your turn, There is a button below that when clicked will "BOOT UP" the
MTLNAC computer. When you get there see if you can use it to ADD the binary numbers,
01101101 and 00011101.