Background
A digital computer is a system that can solve problems by calculating information that is of discrete form. Any set that is restricted to a finite number of elements contains discrete information. The word “digital” tells us that the information being processed by the computer is made of digits and therefore, the computer operates based on a number system. Namely, it uses the binary number system.
This would lead you to believe that digital computers simply process information composed of 1s and 0s and while that is true in theory, there is a different way to look at it. The 1s and 0s in a computer are represented physically by something called electrical signals such as voltages and current.
Therefore, as the circuit processes data, it is processing binary conditions which are high (1) and low (0). This high and low terminology refers to the amount of voltage behind each of the conditions. A high condition/state that has a binary value of 1 typically has a voltage of 5V (it is 4.5V in this project). A low condition/state that has a binary value of 0 typically has a voltage of 0V.
Logic gates are exactly what they sound like. What does a gate do? It either allows or stops something from going from one side of the gate to the other. Similarly, logic gates control the flow of electrical current. The “gate” itself is called a transistor. The way a transistor works is that when it is ON/open, it will open its gate and allow electricity to pass through and if it is OFF/closed, the gate is closed, and no current can pass through. When you combine a bunch of transistors together, you get a logic gate. Whether the gate opens or closes depends entirely on the type of logic gate you are using. For example, an AND logic gate is built such that the transistors will open their gates only if all the inputs are high (1’s) whereas a NOT gate will only open its gate if the input is low (0).
Transistors
Only for the sake of understanding what is going on inside the 7400-series digital logic integrated circuits (i.e., logic gate chips) we are using for this project, I will describe the behaviors of two transistor logic gates first.
Transistor AND Gate
![](https://static.wixstatic.com/media/b7337c_eba5fab2cd714069956dd9ef0cd3f5d1~mv2.png/v1/fill/w_665,h_274,al_c,q_85,enc_auto/b7337c_eba5fab2cd714069956dd9ef0cd3f5d1~mv2.png)
Transistor AND Gate when input values are (1,1), (0,1), and (0,0) respectively
As you can see from the diagrams above, the circuit is set up in a way where all the components are connected end-to-end. This creates a single path for electricity to flow through. Therefore, if there were to be anything that stopped electricity from flowing at any point in the circuit, the rest of the circuit would not get electricity and the LED would not light up. The transistors used here are N-Type transistors which open their gates when the input is 1. Thus, as you can see in the second diagram, by inputting a 0 through the first transistor, the gate did not open and therefore, it didn’t matter where or not we had a 1 in the second input because the electricity didn’t have a chance to make it there as it is held up at the first transistor. This circuit brings home the concept of an AND gate. We need transistor 1 AND transistor 2 to open their gates to allow electricity into the LED.
Thankfully, we don’t have to draw out this whole circuit every time we want to use an AND gate. We can simply use the following symbol:
![](https://static.wixstatic.com/media/b7337c_7e51345f229548608d6200a57cb08807~mv2.png/v1/fill/w_562,h_122,al_c,q_85,enc_auto/b7337c_7e51345f229548608d6200a57cb08807~mv2.png)
AND Gate using AND Gate symbol when input values are (1,1) and (0,1) respectively
The whole point of explaining this is so that when you’re using that funky little D symbol to represent AND, in your circuit, you know deep down that this symbol holds a series circuit inside it with transistors that act as gates, which is why it’s an AND gate.
Now, are you ready to dissect an OR Gate?
Transistor OR Gate
![](https://static.wixstatic.com/media/b7337c_e179af7dbea7432497feefa7325933d0~mv2.png/v1/fill/w_602,h_269,al_c,q_85,enc_auto/b7337c_e179af7dbea7432497feefa7325933d0~mv2.png)
Transistor OR Gate when input values are (1,1), (0,1), and (0,0) respectively
We have something interesting going on here. From the diagram above, it appears that the first transistor is directly connected to the LED, making no connection with the second transistor. Also, the second transistor is connected directly to the power source this time instead of being connected to the first transistor. This means that the behavior of either transistor is not affected by the other transistor. This is the concept behind a parallel circuit where there is more than one path for electricity to flow. Therefore, we can achieve our desired result (i.e., a lit-up LED), if the first transistor has an input of 1 and thus opens its gate OR if the second transistor has an input of 1 and opens its gate. The only time we would not reach our goal is if both inputs were 0 because then that would mean both gates did not open.
All of that can be reduced to the following symbol:
![](https://static.wixstatic.com/media/b7337c_d2fc072903364d60931c8a58201ccc92~mv2.png/v1/fill/w_559,h_109,al_c,q_85,enc_auto/b7337c_d2fc072903364d60931c8a58201ccc92~mv2.png)
OR Gate using OR Gate symbol when input values are (1,1) and (0,1) respectively
So, the lesson here is that while these cute symbols are easy to use, the reason that they are the way they are isn’t just because your textbook said so. It’s because they are circuits carrying electricity using resistors, transistors, and diodes.
Now, let’s fast forward to the 1960s – a time of go-go boots, lava lamps, and the first integrated circuit.
Integrated Circuits
We now had the ability to cram about 20 transistors into a little silicon along with resistors and diodes which meant running multiple logic gates through the same chip at the same time. An invention that would eventually lead us to the 7400-series digital logic integrated circuits (i.e., logic gate chips) that we use today.
![](https://static.wixstatic.com/media/b7337c_865df7ddd1e648e6a761f72d0db5b37a~mv2.png/v1/fill/w_623,h_276,al_c,q_85,enc_auto/b7337c_865df7ddd1e648e6a761f72d0db5b37a~mv2.png)
AND Logic Gate and Functional Pinout Diagram
![](https://static.wixstatic.com/media/b7337c_f7c1cb30f65b438dab73a837038ae4cf~mv2.png/v1/fill/w_633,h_263,al_c,q_85,enc_auto/b7337c_f7c1cb30f65b438dab73a837038ae4cf~mv2.png)
OR Logic Gate and Functional Pinout Diagram
These same concepts apply to the NOT, NAND, NOR, XOR, etc. gates so I won’t be touching on them in this article.
You may be thinking, “Okay great, now can we finally build a circuit?!” And the answer is: yes, we can!
Here is what you’ll need:
Breadboard
40-pack of Male-to-Male "Bouncy" Jumper Wires
3-AA Battery Holder
AA Batteries
5-pack of 100-ohm Resistors
5-pack of 1K-ohm Resistors
1 LED
AND Gate
DIP Switch
Optional: "Bendy" Jumper Wires
Here is where you can buy it:
Here is how you put it all together:
With this information, we can now look at some more complex logic diagrams and how to express them so that they are easier to understand – which will be discussed in my next article.
So cool! Very informative