Contents | < Browse | Browse >

/// Binary Mathematics                 Just what you never wanted to know!
    By Mike Troxell

                            BINARY MATHEMATICS
                              (or 1 + 1 = 3)

I know most people say they never want to see another math book (or math
article in this case) after they finish High School. I said the same thing.
So why an article on Binary? Well, first of all, computers use the binary
number system to operate, so if you are really interested in computers, you
will want to at least learn the basics of the binary system sooner or
later.  Second, most of my friends think I should be locked up when I tell
them this, but binary math is really fun once you get the used to it.
Make a bet with your friends that you can prove that 1 + 1 =3.  Just be
sure and forget to tell them what number base you are working in. Also,
once you learn a little about the binary number system, you can start
playing around with logic gates and learn exactly what makes a computer
capable of making logic decisions. 

Okay, so you're not excited about reading a dull article on math. Read the
article anyway. If you understand the title (1+1=3) then you're probably
saying to yourself that you already know enough about binary. Humor me.
Read the article anyway. If enough people are interested, I'd like to do
a series of articles on logic gates (AND, OR, NAND, NOR, XOR), truth tables 
and designing circuits with logic gates. 

We normally use base 10 (0,1,2,3,4,5,6,7,8,9,10,11,12,ect.). Why? Probably 
because we have ten fingers and ten toes. If humans were all born with 8 
fingers and 8 toes, we would probably be counting in base 8. Computers 
(on the other hand?) have two states, on and off / 0 or 1, so they use 
binary (base 2). When we count in base 10, the first place represents 1's, 
the second place 10's, the third place 100's and so on so that 147 means 7 
1's, 4 10's and 1 100. In binary all you have is 0 and 1. Each place in a 
binary number represents the previous number times 2. The binary table
looks something like this:

1 2 4 8 16 32 64 128 256 512 1024 2048 4096 ..............

only you count from right to left so it would really look like

......4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1

A binary number is either on or off, either 1 or 0. If the numbers place 
has a 1 in it then it represents the values of that place. If there is a 
0 then it represents, you got it, 0. So the binary 1010 represents 10 

1  0  1  0 
8  0  2  0  

As you can see, the first 1 is in the 8's place (>1<010) so it represents 
an 8, the first 0 is in the 4's place (1>0<10) but since it is a 0 (off) 
then the 4's place has a value of 0, the second 1 is in the 2's column 
(10>1<0) so it represents a 2 and the second 0 is in the 1's column 
(101>0<) so it is a 0. This gives you a 8+0+2+0=10. It's really a very 
simple and logical system once you get used to it. Try working a few of 
these problems out. I'll give you the answer in base 10. The easiest way 
to work them is to draw a binary table out at the top of the page like the 
one in the article (.....32, 16, 8, 4, 2, 1)

  101   = 5
  110   = 6
 1010   = 10
 1100   = 12
10110   = 22
11111   = 31

[I'm working these problems out without a calculator, so if anyone finds an 
error, just remember -- I'm just a lowly writer. Rob's the editor.]   :)

[Editor's Note:  Gee, thanks Mike!]

I mentioned earlier that I would like to do a series of articles on Logic 
Gates and designing simple circuits with Logic Gates.  If anyone is 
interested, please drop me a note at one of my Email addresses listed at
the beginning of the magazine, or send it to the editor.  Rob will pass
it onto me.