Sei sulla pagina 1di 67

LOGIC GATES

 Logic gates are electronic switches


Input 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

Input Output
A B C X

Author : Khairi
LOGIC GATES

NOT GATE
Output is opposite to input
A X

Symbol for NOT GATE

INPUT OUTPUT Boolean expression

A X
1 0 X=A
0 1

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 1 0
1 0 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 1 0
1 0 0
1 1 1

Corresponding electric circuit Author : Khairi


LOGIC GATES
AND GATE (3 inputs)

A
B X = A B C
C

Boolean expression for X

X= A B C

Author : Khairi
LOGIC GATES
AND GATE (3 inputs)

A
B X = A B C
C

Combination of possible inputs

23 = 2 x 2 x 2
=8

Author : Khairi
LOGIC GATES
AND GATE (3 inputs)

A
B X =A B C
C
Truth table
A B C X=A B C
0 0 0 0
0 0 1 0
0 1 0 0
1 0 0 0
1 1 0 0
1 0 1 0
0 1 1 0
1 1 1 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 B X=A B
0 0

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 B X=A B
0 0 1
0 1

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 B X=A B
0 0 1
0 1 1

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 B X=A B
0 0 1
0 1 1
1 0 1
1 1 0

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 B C

INPUT OUTPUT
A B C X
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0 Author : Khairi
LOGIC GATES

OR GATE Choose any one high

A
X
B
Boolean expression for X

X=A+B
INPUT OUTPUT
A B X
0 0 0
0 1 1
1 0 1
1 1 1

Author : Khairi
LOGIC GATES

OR GATE

A
X
B
Boolean expression for X

X=A+B
INPUT OUTPUT
A B X
0 0 0
0 1 1
1 0 1
1 1 1
Corresponding electric circuit
Author : Khairi
OR GATE LOGIC GATES

A
B X
C Boolean expression for X
INPUT OUTPUT X=A+B+C
A B C X
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1 Author : Khairi
LOGIC GATES
NOR GATE

A
X
B
Boolean expression for X
X=A+B

INPUT OUTPUT
A B X
0 0 1
0 1 0
1 0 0
1 1 0

Author : Khairi
LOGIC GATES
EXERCISE

P
Q X
R
INPUT OUTPUT Write Boolean expression for X.
P Q R X List all possible inputs and
outputs for the logic gate in a
0 0 0 1 truth table
0 0 1 0
0 1 0 0
0 1 1 0 X=P+Q+R
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0 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 A B
B

C
D

What is the Boolean expression for X

Author : Khairi
LOGIC GATES
COMBINATION OF LOGIC GATES

A A B
B

C
D
C D

What is the Boolean expression for X

Author : Khairi
LOGIC GATES
COMBINATION OF LOGIC GATES

A A B
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
X
Q

Equivalent logic gate is NOR GATE


Author : Khairi
LOGIC GATES
EXERCISE

P
Q

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 X

0
1 1

What is the output,X ?

Author : Khairi
LOGIC GATES
EXERCISE

B X

Build a truth table for the combination of logic gates above

A B X
0 0 0
0 1 1
1 0 0
1 1 0

Author : Khairi
LOGIC GATES
EXERCISE

1 1
1
X
0
1
1 0

State the output for X

Author : Khairi
LOGIC GATES
EXERCISE

1 1
1

X
1
0
1 0

State the output for X

Author : Khairi
LOGIC GATES
EXERCISE

1 1
1

X
0
0
1 0

State the output for X

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011
X
1001

State the output for X

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011 1
X
1001

State the output for X

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011 10
X
1001

State the output for X

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011 1 01
X
1001

State the output for X

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011 1 011
X
1001

State the output for X

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011 1 011
X
1001

State the output for X

Output X = 1011

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011 1
1001 X

State the output for X

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011 10
1001 X

State the output for X

Author : Khairi
LOGIC GATES
SERIAL INPUT

1011 100
1001 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

X
1111
1101
0001 0001

State the output for X

Author : Khairi
LOGIC GATES
EXERCISE

0000
1111
1001

X
1110
1101
0001 1110
State the output for X

Author : Khairi
LOGIC GATES
EXERCISE

0000
1111
1001

X
0001
1101
0001 1110
State the output for X

Author : Khairi
LOGIC GATES
INPUT FROM TIMING DIAGRAM

1 1

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
If P and Q are
INPUT P 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
Draw the output if the inputs
are fed to NOR GATE

0 0 1 1 0 1 0

0 1 0 0 0 0 1

Author : Khairi
LOGIC GATES
EXERCISE

Draw the output X

Author : Khairi
ENRICHMENT PRACTICE

Q Security lamp
Light sensor X

Relay switch

Body heat sensor

Name the logic gate P.


NOT gate

Author : Khairi
ENRICHMENT PRACTICE

Q Security lamp
Light sensor 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

Q Security lamp
Light sensor X

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

Q Security lamp
Light sensor 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 Both S1 and S2 have to close


B. Z=X Y to produce Z high

C. Z=X Y
D. Z=X Y

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 S2 Output P S1 S2 Output Q

0 0 0 0 0 1
1 0 1 1 0 1
1 1 0 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

Potrebbero piacerti anche