Professional Documents
Culture Documents
Logic Gates
Logic Gates
“0” is off
What is a TRUTH
TABLE? AND Gate
Truth Table
• a mathematical table
used in logic to evaluate A B OUTPUT
AND Gate OR
OR Gate
NOT Gate NOT
NAND Gate
NAND
NOR Gate
XOR Gate NOR
XNOR Gate
XOR
XNOR
AND Gate
• Performs the logical conjunction (∧) operation.
• Has two or more inputs and one output
• Output is 1 only if all inputs are 1.
INPUTS OUTPUT
0
0
0
INPUTS OUTPUT
1
0
0
INPUTS OUTPUT
0
0
1
INPUTS OUTPUT
1
1
1
AND Gate Truth Table
A B OUTPUT
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate
• Implements logical disjunction
• Outputs “true” if any of its inputs are “true”
• Addition (?)
INPUTS OUTPUT
0
0
0
INPUTS OUTPUT
0
1
1
INPUTS OUTPUT
1
1
0
INPUTS OUTPUT
1
1
1
OR Gate Truth Table
A B OUTPUT
0 0 0
0 1 1
1 0 1
1 1 1
NOT Gate
• Inverter
• Inverts input
• Outputs 0 if input is 1, and vice versa.
• Flip-flop gate.
INPUT OUTPUT
0 1
INPUT OUTPUT
1 0
NOT Gate Truth
Table
A OUTPUT
0 1
1 0
NAND Gate
• NOT-AND Gate
• Performs the inverse (NOT) of an AND gate
• Two or more inputs and one outputs
• Output is 0 ONLY is ALL INPUTS are 1
INPUTS OUTPUT
0
1
0
INPUTS OUTPUT
0
1
1
INPUTS OUTPUT
1
1
0
INPUTS OUTPUT
1
0
1
NAND Gate Truth Table
A B OUTPUT
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate
• NOT-OR gate
• Performs the logical opposite of the OR operation
• Output is 1 if all inputs are 0
• “none-or-nothing” gate
INPUTS OUTPUT
0
1
0
INPUTS OUTPUT
1
0
0
INPUTS OUTPUT
0
0
1
INPUTS OUTPUT
1
0
1
NOR Gate Truth Table
A B OUTPUT
0 0 1
0 1 0
1 0 0
1 1 0
XOR gate
• eXclusive OR gate
• Exclusive disjunction operation
• Two inputs, one output
• Outputs 1 ONLY if EXACTLY ONE of the inputs is 1.
INPUTS OUTPUT
0
0
0
INPUTS OUTPUT
0
1
1
INPUTS OUTPUT
1
1
0
INPUTS OUTPUT
1
0
1
XOR Gate Truth Table
A B OUTPUT
0 0 0
0 1 1
1 0 1
1 1 0
XNOR Gate
• eXclusive NOR gate
• Performs the logical complement of XOR operation
• Two or more inputs, one output
• Outputs 1 ONLY of BOTH inputs are the same
INPUTS OUTPUT
0
1
0
INPUTS OUTPUT
1
0
0
INPUTS OUTPUT
0
0
1
INPUTS OUTPUT
1
1
1
Logic Gate Symbol Outputs 1 if: Outputs 0 if:
at least one input is
AND all inputs are 1
0
OR any of inputs is 1 all inputs are 0
(1 𝐴𝑁𝐷1) 𝐴𝑁𝐷0=1𝐴𝑁𝐷0=0
A=1
B=0
C=1
Q=?
A=1
B=0
C=0
D=0
Q=?
A=1
B=0
C=1
D=1
Q=?
A=1
B=0
C=1
D=1
E=0
F=0
G=1
Q=?