LOGIC GATES AND GATE

LOGIC GATES
Input
 Logic gates are electronic switches
with one or more input but
only one output
 Logic gates are commonly found in
computers and other electronic
system
Logic
gate
 Input and output for logic gates
only 1 or 0
Output
Author : Khairi
LOGIC GATES
TRUTH TABLE
All inputs and outputs of logic gates can be displayed by
using a table
The table is known as truth table
Output
Input
A
B
C
X
Author : Khairi
LOGIC GATES
NOT GATE
Output is opposite to input
A
X
Symbol for NOT GATE
INPUT
OUTPUT
A
X
1
0
0
1
Boolean expression
X=A
Truth table
Author : Khairi
LOGIC GATES
NOT GATE
A
X
Symbol for NOT GATE
INPUT
OUTPUT
A
X
1
0
0
1
Truth table
Corresponding electric circuit
Author : Khairi
LOGIC GATES
NOT GATE
A
X
Symbol for NOT GATE
INPUT
OUTPUT
A
X
1
0
0
1
Truth table
Corresponding electric circuit
Author : Khairi
LOGIC GATES
AND GATE
Choose all high
A
X
B
Boolean expression
X=A
B
INPUT OUTPUT
A
B
X
0
0
0
0
0
1
0
1
0
1
1
1
Corresponding electric circuit
Author : Khairi
LOGIC GATES
AND GATE
A
X
B
Boolean expression
X=A
B
INPUT OUTPUT
A
B
X
0
0
0
0
0
1
0
1
0
1
1
1
Corresponding electric circuit Author : Khairi
LOGIC GATES
AND GATE (3 inputs)
A
X = A
B
C
B
C
Boolean expression for X
X= A
B
C
Author : Khairi
LOGIC GATES
AND GATE (3 inputs)
A
X = A
B
C
B
C
Combination of possible inputs
23 = 2 x 2 x 2
=8
Author : Khairi
LOGIC GATES
AND GATE (3 inputs)
A
X =A
B
C
B
C
Truth table
A
B
C
0
0
0
1
1
1
0
1
0
0
1
0
1
0
1
1
0
1
0
0
0
1
1
1
X=A
B
C
0
0
0
0
0
0
0
1
Author : Khairi
LOGIC GATES
NAND GATE
A
X
B
Boolean expression for X
X=A
B
Author : Khairi
LOGIC GATES
NAND GATE
A
X=A
B
B
Combination of possible inputs
22 = 2 x 2
=4
Author : Khairi
LOGIC GATES
NAND GATE
A
X=A
B
B
Truth table
A
0
B
0
X=A
B
Output for NAND GATE is opposite the output of AND GATE
Author : Khairi
LOGIC GATES
NAND GATE
A
X=A
B
B
Truth table
A
0
0
B
0
1
X=A
1
B
Input 00 for AND GATE produces 0 output
Inverting the output to get the output for AND GATE
Author : Khairi
LOGIC GATES
NAND GATE
A
X=A
B
B
Truth table
A
0
0
B
0
1
X=A
1
1
B
Input 01 for AND GATE produces 0 output
Inverting the output to get the output for AND GATE
Author : Khairi
LOGIC GATES
NAND GATE
A
X=A
B
B
Truth table
A
0
0
1
1
B
0
1
0
1
X=A
1
1
1
0
B
Corresponding electric circuit
Author : Khairi
LOGIC GATES
EXERCISE
A
B
C
X
Write the Boolean expression for X
and list down all the possible inputs and outputs for the
gate in a truth table
Author : Khairi
LOGIC GATES
EXERCISE
A
B
C
X =A
A
0
0
0
0
1
1
1
1
INPUT
B
0
0
1
1
0
0
1
1
OUTPUT
C
X
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
1
B
C
Author : Khairi
LOGIC GATES
OR GATE
A
B
Choose any one high
X
Boolean expression for X
X=A+B
INPUT OUTPUT
A
B
X
0
0
0
1
0
1
1
1
0
1
1
1
Author : Khairi
LOGIC GATES
OR GATE
A
B
X
Boolean expression for X
X=A+B
INPUT OUTPUT
A
B
X
0
0
0
1
0
1
1
1
0
1
1
1
Corresponding electric circuit
Author : Khairi
LOGIC GATES
OR GATE
A
B
C
X
Boolean expression for X
INPUT
OUTPUT
A
B
C
X
0
0
0
0
1
0
0
1
0
0
1
1
1
0
0
1
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
X=A+B+C
Author : Khairi
LOGIC GATES
NOR GATE
A
B
X
Boolean expression for X
X=A+B
INPUT OUTPUT
A
B
X
1
0
0
0
0
1
0
1
0
0
1
1
Author : Khairi
LOGIC GATES
EXERCISE
P
Q
R
X
INPUT
OUTPUT
P
Q
R
X
1
0
0
0
0
0
0
1
0
0
1
1
1
0
0
1
0
0
0
0
1
1
1
0
1
1
1
0
1
0
0
0
Write Boolean expression for X.
List all possible inputs and
outputs for the logic gate in a
truth table
X=P+Q+R
Author : Khairi
LOGIC GATES
COMBINATION OF LOGIC GATES
In the electronic circuit,logic gates are combined into various
combination to produce a desired output
AND
AND
NAND
Author : Khairi
LOGIC GATES
COMBINATION OF LOGIC GATES
A
B
A
B
X
C
D
What is the Boolean expression for X
Author : Khairi
LOGIC GATES
COMBINATION OF LOGIC GATES
A
B
A
B
X
C
D
C
D
What is the Boolean expression for X
Author : Khairi
LOGIC GATES
COMBINATION OF LOGIC GATES
A
B
A
B
A
B
C
D
X
C
D
C
D
What is the Boolean expression for X
Author : Khairi
LOGIC GATES
COMBINATION OF LOGIC GATES
P+Q
P
X
Q
P+Q
Write the Boolean expression for X and state the equivalent
basic logic gate.
P
Q
X
Equivalent logic gate is NOR GATE
Author : Khairi
LOGIC GATES
EXERCISE
P
Q
X
R
S
Write the Boolean expression for X
X=P+ Q +
R
S
Author : Khairi
LOGIC GATES
COMBINATION OF LOGIC GATES
1
0
0
0
0
1
X
1
What is the output,X ?
Author : Khairi
LOGIC GATES
EXERCISE
A
X
B
Build a truth table for the combination of logic gates above
A
0
0
B
0
1
X
0
1
1
1
0
1
0
0
Author : Khairi
LOGIC GATES
EXERCISE
1
1
1
0
1
1
X
0
State the output for X
Author : Khairi
LOGIC GATES
EXERCISE
1
1
1
1
X
0
1
0
State the output for X
Author : Khairi
LOGIC GATES
EXERCISE
1
1
1
0
X
0
1
0
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
X
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
1
X
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
10
X
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
1 01
X
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
1 011
X
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
1 011
X
State the output for X
Output X = 1011
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
1
X
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
10
X
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
100
X
State the output for X
Author : Khairi
LOGIC GATES
SERIAL INPUT
1011
1001
1001
X
State the output for X
Output X = 1001
Author : Khairi
LOGIC GATES
EXERCISE
1111
1111
1001
1111
X
1101
0001
0001
State the output for X
Author : Khairi
LOGIC GATES
EXERCISE
1111
0000
1001
1110
X
1101
0001
1110
State the output for X
Author : Khairi
LOGIC GATES
EXERCISE
1111
0000
1001
X
0001
1101
0001
1110
State the output for X
Author : Khairi
LOGIC GATES
INPUT FROM TIMING DIAGRAM
1
1
1
0
0
0
The input is 1001
Author : Khairi
LOGIC GATES
INPUT FROM TIMING DIAGRAM
1 0 1
X = 101
0 0
1
Draw the output for X on timing diagram
Get the input in binary number
Get the output in binary number
Draw the timing diagram for output X
Author : Khairi
LOGIC GATES
INPUT FROM TIMING DIAGRAM
INPUT P
If P and Q are
the inputs
of AND GATE.
Draw the output X
INPUT Q
OUTPUT X
Author : Khairi
LOGIC GATES
EXERCISE
1 0
1 1 1 0 0
0 0 1
Draw the output if the inputs
are fed to NOR GATE
1 0 1 0
0 1 0 0 0 0 1
Author : Khairi
LOGIC GATES
EXERCISE
X
Draw the output X
Author : Khairi
ENRICHMENT PRACTICE
P
Q
Light sensor
Security lamp
X
Relay switch
Body heat sensor
Name the logic gate P.
NOT gate
Author : Khairi
ENRICHMENT PRACTICE
P
Q
Light sensor
Security lamp
X
Relay switch
Body heat sensor
Q is AND gate.Draw the AND gate by using two switches,batteries
and lamp.
Author : Khairi
ENRICHMENT PRACTICE
P
Security lamp
Q
X
Light sensor
Relay switch
Body heat sensor
Complete the truth table below for output X.
Input light sensor
Input body heat sensor
Output X
0
0
0
0
1
1
1
0
0
1
1
0
Author : Khairi
ENRICHMENT PRACTICE
P
Q
Light sensor
Security lamp
X
Relay switch
Body heat sensor
State the function of the relay switch in the circuit.
To switch on or off the security lamp.
Author : Khairi
PAST YEARS QUESTION
Which of the following truth tables represents output R in the circuit ?
Author : Khairi
PAST YEARS QUESTION
Which of the following truth tables represents output R in the circuit ?
Author : Khairi
PAST YEARS QUESTION
What is the get X which produces the output in the truth table ?
A.
AND
B.
OR
C.
NAND
D.
NOR
Author : Khairi
PAST YEARS QUESTION
Which of the Boolean algebraic expression represents the output Z ?
A.
Z=X
Y
B.
Z=X
Y
C.
Z=X
Y
D.
Z=X
Y
Both S1 and S2 have to close
to produce Z high
Author : Khairi
PAST YEARS QUESTION
0101
1110
1110
1001
0110
Which of the following output signals is produced by the logic
gate circuit ?
A.
B.
C.
D.
Author : Khairi
PAST YEARS QUESTION
Which truth table is correct ?
Author : Khairi
PAST YEARS QUESTION
Figure shows two combination of logic gates.
a. Name the logic gate M.
OR gate
b. Complete the truth table for P and Q
S1
0
S2
0
1
1
0
1
Output P
0
1
0
S1
0
S2
0
1
1
0
1
Output Q
1
1
1
Author : Khairi
PAST YEARS QUESTION
Figure shows the system used to control the level of pesticide in a bottle
Input S1 and S2 is “0” when they receive a low level of radiation and “1”
when they receive a high level of radiation.
a. State the level of the pesticide in the bottle if the input S1 is “0”.
Give your reason.
Level of pesticide in the bottle is high because it receives low radiation
due to less penetration of radioactive radiation
Author : Khairi
PAST YEARS QUESTION
Figure shows the system used to control the level of pesticide in a bottle
Input S1 and S2 is “0” when they receive a low level of radiation and “1”
when they receive a high level of radiation.
b. State the level of the pesticide in the bottle if the input S1 is “1”.
Give your reason.
Level of pesticide in the bottle is low because it receives high radiation
due to higher penetration of radioactive radiation
Author : Khairi
PAST YEARS QUESTION
Figure shows the system used to control the level of pesticide in a bottle
Input S1 and S2 is “0” when they receive a low level of radiation and “1”
when they receive a high level of radiation.
c. If the output of logic gate system is “1” when the volume of pesticide
accepted and “0” if it is rejected.Which combination of logic gate P or Q is
suitable to be used ?Give reason for your answer.
Combination of logic gate P because both S1 and S2 have to be “0” when the volume
is acceptable
Author : Khairi
PAST YEARS QUESTION
output
What is the output ?
Author : Khairi