鶹Լ

Types of logic gates

use operators. The most common Boolean operators are AND, OR and NOT. Each operator has a standard symbol that can be used when drawing logic gate circuits.

AND gate

An AND gate usually has two inputs. AND tells us that both Input A AND Input B have to be 1 (or ON) in order for the output to be 1. Otherwise the output is 0.

The Boolean expression can be written as Q = A AND B.

The truth table would look like this:

Input AInput BInput Q
000
010
100
111
Input A0
Input B0
Input Q0
Input A0
Input B1
Input Q0
Input A1
Input B0
Input Q0
Input A1
Input B1
Input Q1

Logic gate diagrams would look like this:

AND gate symbol: a semicircle with two inputs (A&B) and one output (Q)

OR gate

An OR gate has two inputs. OR tells us that EITHER Input A OR Input B has to be 1 (or ON) in order for the output to be 1. Otherwise the output is 0.

The Boolean expression can be written as Q = A OR B.

The truth table would look like this:

Input AInput BInput Q
000
011
101
111
Input A0
Input B0
Input Q0
Input A0
Input B1
Input Q1
Input A1
Input B0
Input Q1
Input A1
Input B1
Input Q1

Logic gate diagrams would look like this:

OR gate symbol: a semicircle with a concave side, with two inputs (A&B) and one output (Q)

NOT gate

A NOT gate has just one input. NOT tells us that Input A has to be 0 (or OFF) in order for the output to be 1. Otherwise the output is 0. A NOT gate is sometimes called an inverter.

The Boolean expression is written as Q = NOT A.

The truth table would look like this:

Input AInput Q
10
01
Input A1
Input Q0
Input A0
Input Q1

Logic gate diagrams would look like this:

NOT gate symbol: triangle with a circle on the point, with one input (A) and one output (Q)