# Logic Gates

Logic gates give an output depending on the condition of the inputs. Below are the symbols and truth tables for the common types of logic gates. Note that due to font limitations the Boolean symbol for XOR expressed here as (+) is actually a + sign inside a circle.

#### AND:

A B Output 0 0 0 0 1 0 1 0 0 1 1 1 Expression: Output = A.B

#### OR:

A B Output 0 0 0 0 1 1 1 0 1 1 1 1 Expression: Output = A+B

#### XOR:

A B Output 0 0 0 0 1 1 1 0 1 1 1 0 Expression: Output = A(+)B

#### NOT:

Input Output 0 1 1 0 Expression: Output = Input

#### NAND:

A B Output 0 0 1 0 1 1 1 0 1 1 1 0 Expression: Output = A.B

A NOT gate can be formed from a NAND gate by connecting A and B together.

#### NOR:

A B Output 0 0 1 0 1 0 1 0 0 1 1 0 Expression: Output = A+B

A NOT gate can be formed from a NOR gate by connecting A and B together.

#### XNOR:

A B Output 0 0 1 0 1 0 1 0 0 1 1 1 Expression: Output = A(+)B

A NOT gate can be formed from an XNOR gate by connecting one input to ground.