Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 56

LOGIC GATES

Electronics and Robotics


Quarter 2 Week 2
Describe the concepts
involving Digital
Circuits:
Learning • Binary numbers
• Logic gates
Competency • Diodes and transistors as
switches
• IC logic
• CMOS logic
• Multi-vibrators
“1” is on

“0” is off
What is a TRUTH
TABLE? AND Gate
Truth Table
• a mathematical table
used in logic to evaluate A B OUTPUT

the truth values of 0 0 0


propositions based on
0 1 0
their logical connectives
• a diagram of the outputs 1 0 0
from all possible 1 1 1
combinations of input.
What are LOGIC
GATES?
• Electronic circuits that
perform basic logical
operations
• Building blocks of digital
circuits
• Used in a wide variety of
applications, including
computers, calculators,
and cell phones
Logic Gate Symbol
Types of Logic Gates AND

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

NOT input is 0 input is 1


at least one input is
NAND all inputs are 1
0
at least one input is
NOR all inputs are 0
1
all inputs are the
XOR exactly one 1 input
same
all inputs are the
XNOR exactly one 1 input
same
You are designing a circuit with two switches, logic gates,
and an LED as the output. Determine the correct logic gate
to be used in the given situations:
1. You want the LED to light up ONLY if ONE of the
switches is ON
2. You want the LED to light up ONLY if BOTH switches
are OFF
3. You want the LED to only light up if exactly ONE of the
switches is ON
4. You want the LED to only switch off if BOTH switches
are either ON or OFF
5. You want the LED to only light up ONLY if ALL switches
are ON
You are designing a circuit with two switches, logic gates,
and an LED as the output. Determine the correct logic gate
to be used in the given situations:
1. You want the LED to light up ONLY if ONE of the
switches is ON - XOR
2. You want the LED to light up ONLY if BOTH switches
are OFF - NOR
3. You want the LED to only light up if exactly ONE of the
switches is ON - XOR
4. You want the LED to only switch off if BOTH switches
are either ON or OFF - XNOR
5. You want the LED to only light up ONLY if ALL switches
are ON - AND
Logic Circuits
• If A=1, B=1, and C=0, what will be the output on Q?
Logic Circuits

(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=?

You might also like