electricity may be put into the device, and the third connection is a place where electricity may come out of the device. Of the three connections, two of them are called “inputs,” because electricity can be sent to them from somewhere else. The third connection is called the “output” because electricity can come out of it and then be sent somewhere else. This computer part is a device that does something with bits. If you have two bits, and you connect those two bits to the inputs, this device “looks” at those two bits, and “decides” whether to turn the one output bit on or off. The way it “decides” is very simple, and is always the same. If both inputs are on, the output will be off. If one or both of the inputs are off, then the output will be on. That’s just the way that the room with the odd light switches worked. Remember that there is nothing but bits inside the computer. This simple device is where bits come from and where they go to. The “decision” that this device makes is how bits come to be turned on and off in a computer. Two bits go into the device, and one bit comes out. Two bits come from somewhere else, are examined by the device, and a new third bit is generated so that it may go somewhere else. If you have been extra observant, you may have asked yourself this question: “when both inputs are off, the output is on, so…. how do you get electricity at the output if both inputs are off?” Well, that is an excellent question, and the excellent answer is that every one of these devices is also connected to power. Like every appliance or table lamp in your house, where each has a plug with two pins, this device has a pair of wires, one of which is connected to a place where the electricity is always on, and the other is connected to a place where the electricity is always off. This is where the electricity for the output comes from. When someone builds a computer, they have to make all of those power connections to each one of those parts in order to have it work, but when we are drawing diagrams 20 of parts, how they are connected, and what they will do, we won’t bother drawing the power wires – they would just clutter up the drawing. It is understood that each part has its power connection, and we don’t worry about it. Just understand that it is there, and we won’t mention it any more for the rest of the book. I wouldn’t have even mentioned it here except that I figured that you’d probably ask yourself that question sooner or later. Now I know I said that you don’t have to understand much about electricity to understand computers. Here is as complicated as it gets. There are actually a half dozen electronic parts inside of this device that make it work, but we are not going to examine those parts in this book. Someone who has an electronics background could look at what’s in there, and in about 30 seconds would say “Oh yeah, if both inputs are on, the output will be off, and for any other combination the output will be on, just like the book says.” And then that person could go ahead and read this book without ever having to think about what’s in there again. Someone who doesn’t know electronics misses out on those few seconds of understanding, but this book is the same for everyone. In normal house wiring, one switch turns one light on and off. In the computer, it takes two switches, and it’s sort of backwards in that they both have to be on to turn the light off. But if you accept the fact that something could be made that operates this way, you can then understand how everything in the computer works. This type of computer part is in fact the ONLY type of part required to build a computer. Of course it takes a lot of them to build a complete computer, but with enough of them, you can make any type of computer. So there you go again, see how simple a computer is? It is just full of this little type of thing – a lot of them to be sure, but this is all there is. Now we need to give this device a name, this thing inside the computer that bits are made of, it is called a “gate.” I can’t find a good reason why it is called a gate, a gate in a fence lets people through when it is open, and stops people when it is closed. A computer 21 gate generates a third bit from two other bits, it doesn’t open and close or stop or let anything through. The meaning of this computer term “gate” doesn’t seem to fit into the common meaning of the word, but sorry, I didn’t make up the name, that’s just what it is called. You’ll get used to it. At least it isn’t some long word from the ancient Greek. In the next few chapters, we are going to show how we can do something useful by connecting several gates together. We will use drawings like the following. The ‘D’ shape with the little circle at its tip represents the device we have described, and the lines represent the wires going in and coming out of it that get attached to other parts of the computer. The picture on the left shows a gate complete with its power wires, but as promised, we won’t be concerned with them for the rest of this book. The drawing on the right shows everything we need: This is a representation of a gate. The two wires on the left (a and b) are the inputs, and the wire on the right (c) is the output. All three wires are bits, which means that they are either on or