Logic Gate

NOT (Inverter)

The inverter is a simple gate that produces an output value that is the opposite of the input value. Below you will find the symbol and the truth table of the inverter.

$\begin{array}{c|c} Input & Output\\ \hline 0 & 1 \\ 1 & 0 \end{array}$

The input is located on the left on this symbol and the output on the right. The little circle on the output is called an inversion bubble and it is used to indicate an inverting behavior.

AND

The AND gate produces a 1 at its output if all of its inputs are 1. If one of the inputs is a 0, the output is gonna be a 0. Below you will find the symbol and the truth table of the logic AND.

$\begin{array}{c c|c} A & B & Output\\ \hline 0 & 0 & 0 \\ 0 & 1 & 0 \\ 1&0&0 \\ 1 & 1 & 1\end{array}$

OR

The OR gate produces a 1 at its output if one of its inputs is a 1. If all of its inputs are 0, the output is gonna be a 0. Below you will find the symbol and the truth table of the logic OR.

$\begin{array}{c c|c} A & B & Output\\ \hline 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1&0&1 \\ 1 & 1 & 1\end{array}$

NAND

The NAND gate produces a 0 at its output if all of its inputs are 1. If one of its inputs is a 0, the output is a 1. Below you will find the symbol and the truth table of the logic NAND.

$\begin{array}{c c|c} A & B & Output\\ \hline 0 & 0 & 1 \\ 0 & 1 & 1 \\ 1&0&1 \\ 1 & 1 & 0\end{array}$

NOR

The NOR gate produces a 1 at its output if all of its inputs are 0. If one of its inputs is a 1, the output is a 0. Below you will find the symbol and the truth table of the logic NOR.

$\begin{array}{c c|c} A & B & Output\\ \hline 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1&0&0\\ 1 & 1 & 0\end{array}$

XOR

The XOR gate with two inputs produces a 0 at its output if all of its inputs are the same. Do note that a 3 or more inputs XOR will have a different behavior than a two inputs XOR. Below you will find the symbol and the truth table of the logic XOR with 2 inputs.

$\begin{array}{c c|c} A & B & Output\\ \hline 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1&0&1\\ 1 & 1 & 0\end{array}$

XNOR

The XNOR gate with two inputs produces a 1 at its output if all of its inputs are the same. Do note that a 3 or more inputs XNOR will have a different behavior than a two inputs XNOR. Below you will find the symbol and the truth table of the logic XNOR with 2 inputs.

$\begin{array}{c c|c} A & B & Output\\ \hline 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1&0&0\\ 1 & 1 & 1\end{array}$