STEM

A tour behind the logic gates

It’s easy to give up any chance of understanding the technology that we rely on every day. Humanity has already been affected by a loss of knowledge. Technology has allowed most of us to avoid learning how to smelt metals, produce plastic, and process grain. Only a small minority of the modern world can still complete these tasks by hand. It’s a privilege to forget about the simple processes that allow us to live our lives, but it’s still rewarding to learn about them.

In sophomore year physics, we learn about circuits, which are collections of electronic components like resistors or light bulbs that are connected by wire. Electricity from a battery flows through a circuit, and the system has an output. For example, a circuit with a light bulb has an input of electricity and an output of light. Alternatively, a circuit could connect to a calculator, which has an input of electricity and a few variables, and an output of a computed number. Or maybe the circuit connects to a computer, which has an input of energy and many, many variables, and an output of sound from a speaker and light from a screen.

Light bulbs, calculators, and computers are all just pieces of a circuit. You connect energy to them, and they proceed through some task. Now, the differences between light bulbs, calculators, and computers are complex… but understandable! To grasp complex circuitry, you just have to understand logic gates, which are the building blocks of circuits.

What is a logic gate? Well, imagine a metal box with a little electronic chip (a logic gate) inside it. On one side of the box is a button that inputs a current to the logic gate when pressed, and on the other side is a shaft that extends when receiving a current from the logic gate’s battery. When the button is pressed, the shaft extends. When the button is released, the shaft retracts. The gate determines an output based on an input and a set of rules. In this box’s case, the rule is that the input is always equal to the output. When current flows in, the logic gate sends current out. This is called the ‘yes’ box, with the gate inside called the ‘yes’ gate, because, yes, the input equals the output.

But there are many other types of gates, too. Imagine another box. This one has two buttons on one side, and one shaft on the other. The shaft stays extended unless both buttons are pressed. So the logic gate is constantly sending a current to the shaft unless the buttons are pressed, which stops the current. Let’s call this one the ‘u-both’ gate.

OK, now you understand the basics of logic gates. Current flows into the gates, and the logic gate type determines when current will flow out. You also understand how the boxes are constructed; wires connect buttons and shafts into the logic gate, forming a circuit. The only thing you don’t know is what makes the logic gates work. Well, very smart electricians construct every type of gate using advanced electrical components like transistors and inductors, but we don’t need to worry about their technical equipment. We can build and understand any type of button-shaft box we can imagine, and we only need ‘u-both’ boxes and tape.

Say we’re making a ‘yes’ box. We start off with one ‘u-both’ box and tape down one of the buttons. This is a natural first step, as the ‘yes’ box only has one input button, so there should only be one button that we can interact with. With this one-input, one-output ‘u-both’ box, the shaft is extended when the button is not being pressed and retracted when the button is pressed. If the single button sends power to the ‘u-both’ gate inside, then no electricity goes to the shaft. We’ve changed the logic of the ‘u-both’ gate with a single strip of tape. Electricians call this the ‘not’ box and ‘not’ gate because the input is not the output. It’s the opposite of a ‘yes’ box.

You know the saying “two wrongs don’t make a right”? Well, when it comes to logic gates, they do. If we put one ‘not’ box behind another, it makes a ‘yes’ box! Imagine it. You press the button on the first ‘not’ box. The front box’s shaft retracts, un-pressing the button of the second ‘not’ box. The shaft of the second ‘not’ box extends! With ‘u-both’ boxes and tape, we’ve created a ‘yes’ box!

Most of us will never need to construct circuits by hand, but understanding technology can be helpful when you use other technology that depends on it. Believe me, if you can fix things like a member of the Geek Squad, your family and friends will keep you around forever.

Leave a Comment

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.