0% found this document useful (0 votes)
8 views

Logic Gates

Logic gates are electronic switches used in various everyday devices that operate based on binary inputs (on/off). The document explains different types of logic gates (AND, OR, NOT, NAND, NOR) along with their truth tables and applications in simple circuits. It also provides examples of how these gates function in practical scenarios, such as security lights and alarms.

Uploaded by

pandey.nikki.now
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Logic Gates

Logic gates are electronic switches used in various everyday devices that operate based on binary inputs (on/off). The document explains different types of logic gates (AND, OR, NOT, NAND, NOR) along with their truth tables and applications in simple circuits. It also provides examples of how these gates function in practical scenarios, such as security lights and alarms.

Uploaded by

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

LOGIC GATES

Logic All very


logical I
Gates think!
Logic All very
logical I
Gates think!

So what
are logic
gates?

A logic gate is an electronic


switch
Logic All very
logical I
Gates think!

So what
are logic
gates?

A logic gate is an electronic


switch
Logic gates are found in
everyday items such as washing
machines, security lamps and
video recorders.
Logic All very
logical I
Gates think!

So what
are logic
gates?

A logic gate is an electronic


switch
Logic gates are found in
everyday items such as washing
machines, security lamps and
video recorders.
Logic gates depend upon
switches being on (1) or off (0)
Just a minute – what’s all Truth table
this analogue and digital Inputs Outpu
t
stuff? A B Q
0 0 0
1 0 0
0 1 0
1 1 1
In the truth table:

0 = OFF
1 = ON

A stop clock, such as the


one shown here, is a
digital device because the
strips that make up the
display can only be on (1)
of off (0)
A stop clock, such as the
one shown here, is a
digital device because the
strips that make up the
display can only be on (1)
of off (0)
Logic gates
Logic gates
AND gate A.B Truth table
Inputs Outpu
t
A B Q
Input A 0 0 0
AND Output Q
0 1 0
Input B
1 0 0
1 1 1

Two inputs, one output.


For the output to be HIGH (on),
both inputs must be HIGH.
Logic gates
OR gate A+B Truth table
Inputs Outpu
t
A B Q
Input A 0 0 0
OR Output Q
0 1 1
Input B
1 0 1
1 1 1

Two inputs, one output.


For the output to be HIGH (on),
at least one of the inputs must
be HIGH (can be both).
Logic gates
NOT gate A
Truth table
Input Output
A Q
0 1
Input A OR
NOT Output Q 1 0

One input, one output.


For the output to be HIGH (on),
the input must be LOW (and
vice versa)
Logic gates
NAND gate Truth table
Inputs Outpu
A • B=A+B t
A B Q
Input A 0 0 1
NAND Output Q
0 1 1
Input B
1 0 1
1 1 0

Two inputs, one output. This is equivalent


For the output to be HIGH (on), to an AND gate with
both inputs A and B must NOT its output inverted
be HIGH. by a NOT gate.
Logic gates
NOR gate Truth table
Inputs Outpu
t
A B Q
Input A 0 0 1
NOR Output Q 0 1 0
Input B
1 0 0
1 1 0

Two inputs, one output. This is equivalent


For the output to be HIGH (on), to an OR gate with
neither inputs A or B is HIGH. its output inverted
by a NOT gate.
Logic gates
NOT gate NAND gate
A
A X X
B

AND gate NOR gate


Whole
A A
X X
B B

OR gate XOR gate


A A
X X
B B
AND

NOR OR

NAND NOT

XOR
Simple circuits using Logic
gates

Tape
recorder
Record
button

Recording
AND circuits

Play
button

The Play and the Record button


have to be pressed
simultaneously in order for the
recording circuits to begin
working.
Simple circuits using Logic
gates
Simple circuits using Logic
gates
Simple circuits using Logic
gates

During the day the


light sensor output is Security light
high.
Light 1
senso
0
r
0 0
Relay Lamp
Body
heat 0/1
senso The relay controls a
separate circuit with
r the lamp in it.
During the day the body
heat sensor can be
either high or low – the
AND gate will not be
triggered.
Simple circuits using Logic
gates

When it is dark the


light sensor output is Security light
low.
Light 0
senso
1
r
1 1
Relay Lamp
Body
heat 1
senso The AND gate receives
two high inputs and
r triggers the relay which
When it is dark, if causes the lamp to switch
someone approaches on.
the body heat sensor is
triggered and becomes
high
Simple circuits using Logic
gates

The alarm can A low temperature


+5V be tested at indicator – eg. In a
any time by
closing the test greenhouse.
switch  HIGH
Test switch (1)
When the greenhouse
is warm enough, the
input from the
temperature
sensor is HIGH (1).
0V
Temperatur
e sensor
1 0 Alarm
0
Simple circuits using Logic
gates

The alarm can A low temperature


+5V be tested at indicator – eg. In a
any time by
closing the test greenhouse.
switch  HIGH
Test switch
When the greenhouse
(1)
cools, the input from
the temperature
sensor is LOW (0).
The NOT gate changes
this to a ‘1’ and the
0V alarm is switched on.
Temperatur
e sensor
0 1 Alarm
1
Simple circuits using Logic
gates

A night-time rain
alarm.
Light sensor During the day, the output
1 0 from the light sensor is always
HIGH (1) so the output from the
NOT gate is always LOW (0) and
the alarm is not switched on.

Moisture 0
sensor 0/1 Alarm
Simple circuits using Logic
gates

A night-time rain
alarm.
Light sensor In darkness the output from
0 1 the light sensor is LOW (0).
This means that the output
from the NOT switch is HIGH
(1). If rain falls on the
moisture sensor then its
output becomes HIGH (1). The
AND gate receives two HIGH
inputs, so the alarm is
Moisture
switched1on.
sensor 1 Alarm
Logic circuits:
Example I
▪ Let us consider the
following circuit. We
will analyse the A P
B
circuit and
Whole
determine its truth
C Q
table. It can be
noted that there are
three inputs, hence,
23=8 possible binary
combinations.
Analysing logic circuits:
Step 2
Intermed
▪ Q is the output of the AND gate Final
Input iate
with P and C as inputs. Q is true output output
only when both P and C are
Q ( P AND
true. A B C P (A or B)
C)
0 0 0 0 0
0 0 1 0 0
A P
0 1 0 1 0
B
0 1 1 1 1
Whole 1 0 0 1 0
1 0 1 1 1
C Q
1 1 0 1 0
1 1 1 1 1
Analysing logic circuits:
Step 3
▪ The intermediate output is removed
to obtain the final truth table. Input Final
▪ Using the logic circuit, the logic output
notation of output Q is Q= (A OR B) Q ( P AND
A B C
AND C. Using symbols in logical C)
notation, 0 0 0 0
Q = (A + B).C 0 0 1 0
0 1 0 0
A P 0 1 1 1
B 0
1 0 0
Whole 1 0 1 1
C Q
1 1 0 0
1 1 1 1
Thank You

You might also like