Now you know the crux of the problem with digital logic. You can't just use diodes and resistors, as the signal degrades. You need amplification. But when you amplify, the amplifying device acts as a NOT gate. How then do you make a standard AND gate with transistors or tubes? Well, it is a bit of a cludge - but what you have to do is build a NAND gate followed by a NOT gate. What in the blue moon is a NAND gate? Well, it is a gate that acts like an AND gate followed by a NOT gate, so the output will wind up being exactly the opposite of what you want. So you simply follow it with another NOT gate to fix the problem. Perhaps pictures will help.
A NOT gate in electronics is also called an INVERTER. It is called that because whatever you put into it, it inverts (turns upside down) the signal, giving an output that is opposite from the input. A NAND gate is an AND gate with a NOT gate immediately following it. Because of this - whatever the output of an AND gate woudl be - the NAND gate would have the OPPOSITE output.
So we build a circuit something like this one. Note that we show a capacitor between the "two" circuits (the NAND and the NOT). This is shown for coupling purposes. By the same token, it could possibly be resistively coupled, or perhaps even directly coupled. The key point here is that you can't build an AND gate with just 2 transistors - you need the third to "invert" the signal.
If we can create an AND gate from a NAND gate - then creating an OR gate shouldn't be a problem - if we can make a NOR gate. And of course - we can.
As you can see from the diagram on the right, data signals come in on inputs A and B respectively. A high on A causes the transistor to conduct. With the emitter at ground, and the collector resistor at a very high level of resistance, the output of the transistor gets sucked down to a low. Same applies for B. So with 2 highs going in, you have a low coming out. On the other hand, given a low on A, the transistor does not conduct at all, and acts as an open. With an open on the transistor, the VCC is seen at the bottom side of the collector resistor, and thus at Q. Putting a not gate at the output of Q turns it into an OR gate.
So far we've studied relay logic, and what is called RTL logic (Resistor-Transistor Logic). There is also TTL logic (Transistor-Transistor Logic), and various other kinds of logic gates. RTL has its good and bad points. Drawbacks of RTL logic is that it has resistors, which use energy and generate noise, thus making for slower, less reliable, higher heat generating, and more energy using circuitry. Good point is that it is easy to build from scratch, and a great educational tool!
The main point though - whether we are using tubes, transistors, MOSFETS or whatever amplifying device (or even relays), is that you understand the basics of how logic circuits work. From there you can play with, and learn other types of logic circuits. We started with AND, NOT, and OR logic statements. Now you are familiar with NAND and NOR gates as well. Of course gates like the AND and OR are not simply limited to 2 inputs. You can have a 256 input or gate if you want to. There are also gates like "Exclusive Or" gates, etc. which I may cover in another course specifically on digital logic.
The gates you have learned are joined in series (cascaded) or parallel in order to create more sophisticated circuitry, which make up the brains of the computer you use. Using ones and zeros, the computer can make simple decisions at a rate of millions per second.
|(On The Following Indicator... PURPLE will indicate your current location)|
[COURSE INDEX] [ELECTRONICS GLOSSARY] [HOME]
|Otherwise - please click to visit an advertiser so they know you saw their ad!|