• entries
31
23
• views
1,909

# Crash Course on Logic Gates

178 views

Have you ever wondered how systems around you function? Like a passing glance at the thermostat and wonder how it maintains the temperature in your house. Well, just like any other system dealing with variables, there has to be logic to tell how other systems should work. In electrical systems, one of the most basic forms of logic comes through chips known as logic gates.

These gates appear on chips, like the one below, where each prong serves a certain purpose. These chips can vary in size, holding a number of gates, but for our purposes, we will look at one with only four.

VDD represents a pin needing to be connected to a voltage source, usually five volts, and Gnd means the pin needs to be connected to ground. The input pins follow the two paths leading into the same end of a gate, while the outputs are represented through single paths. This specific chip is made up of NAND gates which is shown by the shape the pathways lead into and out of.

The main types of gates are referred to as “and”, “or”, and “not”. These gates then have multiple variations I'll discuss below, but these are the basics. Now, how does a circuit relate to logic, I hear you ask. Well, for simplicity, let's assume a circuit either has a voltage of zero or five volts. The zero volts is represented with a 0 and the five volts is represented with a 1. These signals go into a gate, converting it into a designated signal (also a 0 or a 1), used to cause another action.

Below is a table showing the input and corresponding outputs of each gate.

An example would be if I had two inputs, one in the form of a switch and another in the form of a light sensor. I want my cabin to turn it's lights if I hit my switch and it is night time out. When I turn my switch on it sends out a 1. When the sun goes down the light sensor sends out a 1. When both these signals reach an and gate it sends out a 1 to the light inside my house to turn on.

Needless to say, there are systems with hundreds, even thousands, of variables and programmable logic controllers can store strings of gates onto one single chip, but that's a story for another time.

As always thanks for reading! - ThePeculiarParticle

## Create an account

Register a new account