First, a quick recap about what has been going since that fateful day:
- I moved out of my old place and in with my mother. Hey, rent there is cheap.
- I ended one semester and am now nearing the end of another.
- Egypt is (hopefully) on it's way to a democracy!
- Scary fact, just recently the Egyptian military imprisoned a blogger for speaking out against them. This doesn't bode well for those of us hoping that the military leadership won't get too adjusted to their new state of total control over the Egyptian government.
- Libya is in a state of civil war. The U.S. took leadership of a bombing campaign there, then handed it off to to NATO. We don't really know who the opposition is, but I guess our thought is, "hey, they can't be worse than Gaddafi!"
- Obama promised that he wouldn't send footsoldiers to help the Libyan opposition, but I'm hearing rumors otherwise...
- Lots and lots of other stuff.
Well, I'm going to start explaining this randomly in my once-a-semester escapades. First let's start with Boolean logic, which is the foundation of all computing science. Basically, Boolean logic deals with situations in which you have exactly two possible outcomes. You can call these "hi and lo," "off and on," "1 and 0," "true and false" or "cheese and crackers." The idea is that these are the only two possibilities for inputs and outputs.
So, there are some interesting things you can do when you have established that there are only two possible inputs or outputs. For instance, without knowing beforehand what the input is, you could make something that simply outputs the opposite of whatever it's input is. So, if someone input a "1," the gate would output a "0," and vice-versa. In Boolean logic, this is called a "NOT" gate. Get it? The output is NOT whatever it's input was. Here's what's called a "truth table" for NOT, which basically just shows all of the possible outputs for each possible input:
There are actually quite a few of these primitive gates in Boolean logic. There's the AND gate, which has two inputs. It only outputs "1" when both of it's inputs are also "1."
There is also the OR gate. The OR gate takes two inputs. As long as one of it's inputs are "1," it's output is a "1."
There are quite a few other gates too, but they are all based off of these gates. For instance, there is the XOR gate. XOR is short for "Exclusive-OR," which basically means that the output is "1" if it's inputs are different from each other.
There is also the NAND gate, which is just the NOT of an AND gate. That is, it's output is always "1" unless both of it's inputs are "1."
These last two gates are important, because both XOR gates and NAND gates have real-world counterparts. In other words, you can make a NAND gate out of real materials. I believe that it has something to do with the placement of transistors or something like that, but don't hold me to it. The point is that these gates can be realized in real life, and that the NAND gate in particular can be realized at a pretty low cost. Another important property about these gates is that you can make every other logic gate with them. For example, By NANDing an input with itself, you will always produce the NOT of that input. Similarly, you can combine NAND gates to produce every other logic gate. This means that, using NAND gates, you can create every other basic logic gate.
The importance of this being that a computer scientist can create large, complex systems out of these logic gates, then hand off those designs to an electrical engineer, who can take those abstractions and create a real-world circuit that has the same exact properties. In this way, a computer scientist can design an entire computer processor without ever having to know the low-level physics behind how it works.
Whenever I get around to writing my next post, I'm going to show a couple of different designs people use these logic circuits for, specifically the half-adder, full-adder, and a form of computer memory. Without going into detail now, you can use these Boolean logic circuits to add two numbers together, and, as pretty much all mathematics goes back to addition, this is pretty significant.
If you actually read all that, chances are you would be interested in the book Fundamentals of Computing Systems, which is available on Amazon for pretty cheap. It guides you in designing an entire computer system, from the logic gates to the processor to a computer language to an entire Operating System. It's pretty neat!
And now, a lion hunting a gazelle:


No comments:
Post a Comment