LogicI know we've really already predicted the answer to the question "what do we need?": we need the parts that make up a computer. But we haven't determined why those parts the most appropriate? Why transistors? What benefit do we gain from them? What will they allow a computer to do? For that matter, what do we need our computer to do in the first place?
What computers do is obvious. It's right there in the name. They compute. They take input data, make decisions, and give output data. To make decisions, there needs to be some kind of predictable logic.
What kind of logic can a machine use? This logic needs to be a type that a non-thinking thing can do on its own. There needs to be well-defined concrete input data. If we want to make complex decisions then we need a type of logic where the output data from one decision can be the input to another. To that end, no output can be undefined. If it were so, then we could have undefined input which we've already said we don't want. Our options for well-defined input/output is seemingly limitless: letters, numbers, words, etc. Is one type of input more useful than another?
Conveniently enough there is an existing logic we can turn to for help. This type of logic is well established, is fundamental in math and language, has very few rules, and the rules it does have are all simple: Boolean logic (also known as binary logic).
In Boolean logic, data can be either TRUE or FALSE (alternatively: 1 or 0, on or off). Our TRUE and FALSE can relate to each other in a small number of rules that resemble pre-algebra. In keeping with the obvious minimalist theme of this logic, there are only a few relationships (aka: operations) and each is based on only 1 or 2 inputs at a time. With the NOT operation, you can turn one input into its opposite. You can also see if two inputs are the same as each other (XNOR), if both inputs are true (AND), if at least 1 is true (OR), or if one is true but not the other (XOR). Really, XOR and XNOR can be derived from the other 3, so there are only 3 fundamental operations.That's it. There's 100% of the basics of Boolean logic.
Although this feels very limiting compared to the possibility of using numbers and words, this is in fact all we need. For now please trust me. It'll be more apparent later.
SwitchesEnough with the theoretical stuff, how do we get a machine to implement binary logic? Obviously, the on/off state of our data calls to mind light bulbs and light switches. All that remains is to figure out how to implement the 3 logical operations mentioned previously (NOT, AND, OR).
It turns out that the key to implementing the logical operations with electricity is just a matter of using switches wired up certain ways. If you want an AND situation, hook up 2 switches in serial. For OR, hook up 2 in parallel. For NOT, just change the switch's current position.
Electronic Switches: FINALLY, Our 1st hardware
Unless you want to sit there manually toggling switches all day, we need a way to have that part done for us automatically. We want switches that themselves can be controlled by electricity.
Enter: transistors.
And that's where we'll pick up next time.
0 comments:
Post a Comment