top of page
  • Writer's pictureZoe Chowdhury

How to Make a Circuit with Logic Gates

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

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:

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

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:

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.

AND Logic Gate and Functional Pinout Diagram

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:

  1. Breadboard

  2. 40-pack of Male-to-Male "Bouncy" Jumper Wires

  3. 3-AA Battery Holder

  4. AA Batteries

  5. 5-pack of 100-ohm Resistors

  6. 5-pack of 1K-ohm Resistors

  7. 1 LED

  8. AND Gate

  9. DIP Switch

  10. 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.

35 views1 comment

Recent Posts

See All

1 ความคิดเห็น


Serena Fonseca
Serena Fonseca
20 พ.ย. 2566

So cool! Very informative

ถูกใจ
Post: Blog2_Post
bottom of page