The very basis of computers is binary. In electronics everything can be boiled down to 1s and 0s. Logic gates are digital circuits that take one or more binary inputs and produce a binary output. You can check out the basis of logic with Boolean Algebra.
There are seven basic logic gates that we are going to go over today.
For this blog post, you can see that most of the gates take two inputs (X and Y). NOT is the only exception, taking 1 input. Each of these gates has a related truth table and logic symbol (we will learn these later).
AND is a pretty simple. Unless X and Y are 1, 0 will be outputted.
NAND is the negation of AND. The output will always be 1 unless X and Y are 1, when the output will be 0.
OR is the inclusion of one or more inputs will create an output of 1. With OR, X and Y can be 1, and the output will be 1.
NOR is the negation of OR. If X or Y are 1, or X and Y are 1, then the output will be 0. In NOR, the only inputs to output 1 are when X and Y equal 0.
NOT is the simplest logic gate. If a 1 is passed in, it becomes a 0. If 0 is passed in, it becomes 1.
These seven logic gates are pretty simple, but when used in conjunction with each other, they can be used to build integrated circuits!