0% found this document useful (0 votes)
68 views38 pages

Logic Gates

The document discusses different types of logic gates including NOT, AND, OR, NAND, NOR, and XOR gates. It provides truth tables and examples to explain the operation and output of each gate type based on different combinations of input values. It also presents an application example using logic gates to design a security system that controls lights in three rooms and indicates the status using different colored lights.

Uploaded by

Arfan Chatha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views38 pages

Logic Gates

The document discusses different types of logic gates including NOT, AND, OR, NAND, NOR, and XOR gates. It provides truth tables and examples to explain the operation and output of each gate type based on different combinations of input values. It also presents an application example using logic gates to design a security system that controls lights in three rooms and indicates the status using different colored lights.

Uploaded by

Arfan Chatha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

LOGIC GATES

Dr. SM JUNAID ZAIDI


ASSISTANT PROFESSOR
CS & IT DEPARTMENT
SUPERIOR UNIVERSITY LAHORE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


NOT GATE FROM INSIDE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


AND GATE FROM INSIDE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


OR GATE FROM INSIDE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


NAND GATE FROM INSIDE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


BASIC GATES

Not

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


NOT GATE

𝟎 1
𝟏 𝟎

INPUT OUTPUT

𝟏 𝟎
𝟎 1

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


OPERATION WITH WAVE FORM

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


APPLICATION

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


AND GATE
If any One input Or all inputs Low then Output
will be Low.
𝟏 𝟏 𝟎 0 0 𝟎 0 𝟏
AND
𝟏 𝟎 𝟏 0

INPUTS OUTPUT
A B O

0 0 0
𝟎 𝟏 𝟎
𝟏 𝟎 𝟎
𝟏 𝟏SM JUNAID ZAIDI𝟏(ASST PROFESSOR)
Dr
OPERATION WITH WAVE FORM

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE #2

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE #3

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


APPLICATION

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


OR GATE
If any One input Or all inputs high then Output
will be high
𝟏 𝟏 𝟎 0 0 𝟏 1 𝟏
𝟏 𝟎 𝟏 0
OR
INPUTS OUTPUT
A B O

0 0 0
𝟎 𝟏 𝟏
𝟏 𝟎 1
𝟏 𝟏 𝟏
Dr SM JUNAID ZAIDI (ASST PROFESSOR)
OPERATION WITH WAVE FORM

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


APPLICATION

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


NAND GATE
If any one input is Low then output is high, If
all inputs high then output is low.
𝟏 𝟏 𝟎 0 1 𝟏 1 𝟎

𝟏 𝟎 𝟏 0
NAND
INPUTS OUTPUT
A B O

0 0 1
𝟎 𝟏 𝟏
𝟏 𝟎 𝟏
𝟏 𝟏SM JUNAID ZAIDI𝟎(ASST PROFESSOR)
Dr
OPERATION WITH WAVEFORM

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE #1

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE #2

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE#3

NAND GATE AS –VE OR GATE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


NOR GATE

𝟏 𝟏 𝟎 0 1 𝟎 0 𝟎
𝟏 𝟎 𝟏 0
NOR
INPUTS OUTPUT
A B O

0 0 1
𝟎 𝟏 𝟎
𝟏 𝟎 0
𝟏 𝟏 𝟎
Dr SM JUNAID ZAIDI (ASST PROFESSOR)
OPERATION WITH WAVE FORM

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE #1

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE #2

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE#3
OK
NOT OK

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


EXAMPLE

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


THE EXCLUSIVE OR GATE

𝟏 𝟏 𝟎 0 0 𝟏 1 𝟎
𝟏 𝟎 𝟏 0
EX-OR
INPUTS OUTPUT
A B O

0 0 0
𝟎 𝟏 𝟏
𝟏 𝟎 1
𝟏 𝟏 0
Dr SM JUNAID ZAIDI (ASST PROFESSOR)
THE EXCLUSIVE NOR GATE

𝟏 𝟏 𝟎 0
1 𝟎 0 𝟏
𝟏 𝟎 𝟏 0
EX-NOR
INPUTS OUTPUT
A B O

0 0 1
𝟎 𝟏 𝟎
𝟏 𝟎 0
𝟏 𝟏 𝟏

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


Rooms Light Security System
Design a Security system in which different lights
will be on/off of three rooms
When light of any room is on then “1” is going
And if light of any room is off then “0” is moving.
1) If all lights are on then red light should blink
2) If any one light is on then green light should blink
3) If all three rooms lights are off then yellow light
should blink
4) If any one room’s light is OFF out of three rooms
then yellow light should blink.

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


Rooms Light Security System
Room1 RED LIGHT

GREEN LIGHT
Room 2

YELLOW LIGHT

Room 3 BLUE LIGHT

Dr SM JUNAID ZAIDI (ASST PROFESSOR)


Complete Table
Room1 Room 2 Room 3 RED GREEN YELLOW BLUE
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Dr SM JUNAID ZAIDI (ASST PROFESSOR)

You might also like