Make your own free website on Tripod.com
Binary:Introduction

The Base 2 Number System

What is binary?
   
To explain this, first consider the numbers system you use everyday, decimal. Decimal, is the number system we all use for counting. Consider the following number "17", how do we know what this number means? Have you ever thought about it? If someone says they have 17 sheep, can you picture how that looks. Here is an example of "17" X's (XXXXXXXXXXXXXXXXX). If we break down this number "17" we can understand how it works...

1
7
The Ten's place, here the "1" is actually representing the number 10
(XXXXXXXXXX), to determine this multiply the number in this column by 10, 1*10=10
The One's place, the number 7 here is representing (XXXXXXX) , 7 X's, to determin this multiply the "7" by 1 (7*1=7)


   
If these seems too simple, that's because it is. Before we move on to binary, consider one more example.


Ten's Place
One's Place

Tenth's Place
Hundredth's Place
8
3 .
5 0


decimal point



    In this example, there is an added "decimal point", which marks the seperation between whole number values and fractional number values. Using the techinque above, we can "figure out" how to read this number...

    Since "8" is in the tenth's place, we know it represents "8" sets of 10, or 8*10, which equals 80. In the one's place there is a "3", so using the same strategy, (3*1), yields, 3, the ones place is always straightforward, because anything times one, equals itself.

    On the Other side of the decimal point, starting with the "tenth's place" there is a 5 * (.1), we multiple by point 1 because it is in the tenths place, and .1 = one tenth of one. Anyway, 5*.1 = .5, or 1/2. And for the hundreds place there is a "0", so we can skip this because 0*.01=0. Now lets add all of the products together... 80+3+.5+0 = 83.5 or 83 and 1/2. That's all there is to it.

    As you can see the decimal system (base 10) revolves around the number 10. Each place becomes 10 times greater to the left and 10 times smaller on the right. In binary there are only two numbers, the symbols for these numbers could be anything, but we generally use the arabic number system 0,1,2,3,4,5,6,7,8,and 9, except there are only 2 numbers, so we use 0 and 1 and that is the standardized way of doing it. Since there are only 2 numbers the places are a multiple of 2. Ofcourse we still have a one's place, but on the left it increases by a factor of 2 as you go left, and decreases by a factor of 2 as you go right. See the chart below for clarification:


Two's Place
One's Place

Half's Place
Fourth's Place
1
0 .
1 1


"binary" point



    Consider the binary number (base 2) 10.11, This time, it is not apparent what number this really is, but we can still use the same rule to find out.
    Starting with the most significant "bit" (since this is binary there are no "digits", there are bits!!) which is a 1, multply it by its place value which is 2 (1*2=2). We can skip the one's place because it has a zero in it which represents nothing. After crossing the "binary point" we are now in fractional values. The first one is the half's place. (1*1/2=1/2). Then the forth's place. (1*1/4=1/4). Now lets add up all of the products of these muliplications. 2+1/2+1/4=2.75.
    So, 10.11(base 2)=2.75(base 10). If you made it here, you have just successfully converted a binary number into a decimal number!!



The leading zero:
    In any number system leading zeros are generally removed. For example, which would you prefer to see 0000017 or just 17, they are both equivalent but, one avoids the redundancy. The same can be applied to fractional values. One could write 3/2=1.5 or they could say 3/2=1.500000000. The extra zeros are irrelevant. Be sure to keep this in mind with binary numbers as well, it can be confusing to learn a new number system, but don't forget the basic rule. If there is a "binary point use that as your guide where to start, immediately to the left of the point is always the ones place. If there is no point, example: 1001, the far right number is the ones place.
    1001=9, but so does 1001.000000000 and so does 0000001001 and so does 000001001.00000!!

    You may have noticed that it takes a lot more figures to represent a relatively small number in binary. To represent the number 33 in binary 100001, you need 6 bits.

Tricks with binary:
    Just as there are "tricks" to use with our number system (decimal) there are also tricks in binary. What is 54 * 10? You should immediately know the answer is 540, just add a zero!, Since this is base 10 multiplying by 10 can be done by adding a zero. What you are actually doing, however, is shifting the number to the left. Say you had the number 54.3. To multiply this by 10 move all of the digits to  the left by one space. This results in 543.0...
    A similar trick works in binary. Since binary is base 2, multiplying by 2 can be quickly solved just by "shifting" the number to the left.
1001(decimal 9)*10(decimal 2--"10" looks like our number ten but it is actually a "two" in binary!) equals 10010, which is 18. All you have to do is shift once to the left. If you divide by two just shift all of the bits to the right one unit.

DECIMAL
BINARY

BINARY USING LED's On=1 and Off=0

CONTROLS FOR SIMULATION