Lets take a look at what is actually inside Computer Space. This game is often listed as having no ram, rom, or processor. This is only one third true. It would have been too expensive to use a microprocessor. Instead they relied on TTL chips to provide the game logic using logic gates. They are easy to understand. Each gate has one output, it can only be 5 volts or 0 volts. I would normally call 0 volts ground, but it is not completely accurate here. Because the chips weren’t perfect, the 0 volts, could actually be as high as 1.5 volts. This is why they used 0 volts and five. Even if each output was the 1.5 volts from what it should be there is a large margin of error in the middle, so we can be completely sure of the result. 1.5 to 3.5 would be the range in the middle that would indicate an invalid output. But was important so that we can be sure that we never mistake a high for a low or a low for a high. Today’s chips are so much better that many processors actually run at 1.8 volts. If the output is supposed to be 5 volts, it’s referred to as a high or 1. And if the output is supposed to be 0 volts, it’s referred to as a low or 0.
Logic gates come in several varieties. AND, OR, NAND, NOT, and XOR are the most common. An AND gate would have a least 2 inputs if all of the inputs were the high then the output would be high. An OR gate has at least two inputs, if any of the inputs are high, it will be high. A NOT gate only has one input, and it’s output is the opposite of the input, such as a high input gets a low output. A NAND gate is an AND gate and a NOT gate put together. Such that if all the inputs are high you get a low output, otherwise you get a high output. An XOR gate has at least two inputs, and is similar to an OR gate, however unlike an OR gate if all the inputs are high, then the output is low. This is also called an exclusive OR gate.
OK, so now we have gates. What can we do with these things. Actually a lot, your computer is made up of just these, when look at it close enough. He used these to essentially build a single purpose computer. It wasn’t fast, but it did what was needed for the game to run. These gates can only deal with high’s and low’s or 1’s and 0’s. We need to shift our thinking to using binary instead of decimal. The highest number we can count to is really 9, in decimal. But when we reach nine, we do a couple of tricks. The first is to reset the number to zero, and second we add a number to the front of the zero. We start it at 1, then when we count past nine again we repeat. The number goes to zero, and the number to the left gets a 1 added to it and becomes 2. At 99, the we do the same thing, going to zero, we move to the number on the left, we must set this to zero as well. Then the next number on the left become 1. In binary this works exactly the same except we can only count to 1. Zero plus one is one, one plus one is ten. See it’s pretty easy, the 1 is the maximum number, so it went to zero, and then we put a one in front of it, which makes it 10 in binary, or 2 decimal. Binary math is very important, because our logic gates only can handle 1 and 0. Using logic gates and binary math, we can manipulate number quickly and easily. Next week we’ll continue with Computer Space.
You must be logged in to post a comment.