Saturday, September 29, 2012

Binary arithmetic, logic gates and electronics.

A few years ago, I had a question occur to me: Computers are composed of many tiny wires, each of which can be considered either on (state 1) or off (state 0). Part of the network of all of these wires are various logic gates. So, if computers are logic gates and wires, how can computers add, subtract, multiply or divide? In other words, how can arithmetic be reduced to logic?

In any case, this question really stuck with me, and eventually I started reading about it. It turns out that it is somewhat easy to understand how adding can be done with logic gates, as long as the numbers are expressed in binary. Tonight I created my first simulator in Excel that will add two four-bit binary numbers by only using logic gates. Maybe I can build the actual machine someday? In any case, this simulator seems to work perfectly. Plus one can tell that it should based on an understanding of binary arithmetic and logic. I hope I build this device someday. I considered a string a dip switches for the input number, and either LED's or a binary display (if I can find one) for the output. Transistor logic gates themselves are easy to find. For the logic gate schematic, you will find something similar on page 75 of "How Computers Do Math."

All work and no play...

I have made this claim before, but this semester really has been the busiest yet. I have way too many students, and have too many of my office hours occupied. It's Saturday morning at 2:25 AM right now. I finally fell asleep at 3:30 or 4 AM on Friday morning, but then I woke up at 9 AM. Watched Neil and Olivia by myself all day, and then at about 10 PM on Friday (about 4 hours ago) started grading papers. I kept track with a timer, and I graded for 2.75 hours. Every paper I graded was over a week old. In any case, I graded 24 papers total, and don't want to do anymore grading for a long, long time.