Apples OR Oranges: An Introduction to Basic Logic Gates.

Sometimes the best way to understand new concepts is to break them down into the smallest parts possible and then build them back up again. The basic elements for all of our digital electronics are logic gates. Any digital electronic device is specified by chaining individual logic elements together and with a billion of them in the correct order we create a computer.

Almost all of these gates take two digital input signals, either a True or a False and output a single signal as a result. The resulting signal is based on the relationship between the input signals and the output behavior characterizes the type of logic gate. For these gates we denote a True signal as the number ‘1’ and a False signal as the number ‘0’. The common way of representing the behavior of the logic gate is a Truth Table, showing all outputs for all possible input signals. In schematics the logic gates are represented by distinct symbols.

AND

The AND logic gate takes two inputs and outputs a True if and only if both inputs are True.

AND Gate Symbol
AND Gate Symbol
ABA AND B
000
010
111
100
AND Truth Table

NOT

The NOT logic gate is commonly known as an Inverter because it outputs the opposite of the signal that it was given.

NOT Gate symbol.
NOT Gate Symbol
ANOT A
01
10
NOT Truth Table

NAND

The NAND logic gate takes two inputs and outputs a True in all cases except the one where both inputs are True. This behavior can also be achieved by adding a NOT gate to the end of the AND gate, hence the name NAND is an abbreviation of NOT AND.

NAND Gate Symbol
NAND Gate Symbol
ABA NAND B
001
011
110
101
NAND Truth Table

OR

The OR gate outputs True if any of the input signals are also True. Therefore the only time the OR gate has a False output is when both of the inputs are False.

OR Gate Symbol
OR Gate Symbol
ABA OR B
000
011
111
101
OR Truth Table

NOR

The NOR Logic Gate outputs a True value if and only if the two inputs are False. This behavior is the opposite of the OR gate and therefore is represented by a NOT gate attached to the output of an OR gate, hence the name NOR.

NOR Gate Symbol
NOR Gate Symbol
ABA NOR B
001
010
110
100
NOR Truth Table

XOR

The XOR gate only outputs a true result if the two inputs are different. This behavior is known as an Exclusive OR operation.

XOR Gate Symbol
XOR Gate Symbol
ABA XOR B
000
011
110
101
XOR Truth Table

XNOR

The XNOR logic gate outputs a True if both of the inputs are the same value. This is the opposite of the XOR gate behavior, hence the name Exlusive NOT OR.

XNOR Gate Symbol
XNOR Gate Symbol
ABA XNOR B
001
010
111
100
XNOR Truth Table

Further Exploration

We use these basic logic building blocks to create all types of digital circuits. In further posts we will examine the special patterns and methods that connect these logic blocks to create a computer.