68.logic gates

Preview:

DESCRIPTION

24.logic gates

Citation preview

Author : Khairi

LOGIC GATES

Logicgate

Input

Output

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

Input and output for logic gates only 1 or 0

Author : Khairi

TRUTH TABLE

All inputs and outputs of logic gates can be displayed by using a table

The table is known as truth table

LOGIC GATES

Input Output

A B C X

Author : Khairi

NOT GATE

Symbol for NOT GATE

A X

INPUT OUTPUT

A X

1

0

Truth table

0

1

Boolean expression

X = A

Output is opposite to input

LOGIC GATES

Author : Khairi

NOT GATE

A X

INPUT OUTPUT

A X

1

0

Truth table

0

1

Corresponding electric circuit

LOGIC GATES

Symbol for NOT GATE

Author : Khairi

A X

INPUT OUTPUT

A X

1

0

Truth table

0

1

Corresponding electric circuit

LOGIC GATES

Symbol for NOT GATE

NOT GATE

Author : Khairi

AND GATE

Boolean expression

X = A B

INPUT OUTPUT

A B X

0

0

0

1

1 0

1 1

0

0

0

1

A

BX

Corresponding electric circuit

Choose all high

LOGIC GATES

Author : Khairi

Boolean expression

X = A B

INPUT OUTPUT

A B X

0

0

0

1

1 0

1 1

0

0

0

1

A

BX

Corresponding electric circuit

LOGIC GATES

AND GATE

Author : Khairi

AND GATE (3 inputs)

Boolean expression for X

X = A B C

A B C=

A

B X

C

LOGIC GATES

Author : Khairi

Combination of possible inputs

23 = 2 x 2 x 2= 8

A B C=

A

B X

C

LOGIC GATESAND GATE (3 inputs)

Author : Khairi

Truth table

A B C X A B C=0 0 0 00 0 1 00 1 0 01 0 0 01 1 0 01 0 1 00 1 1 01 1 1 1

A B C=A

B XC

LOGIC GATESAND GATE (3 inputs)

Author : Khairi

NAND GATE

Boolean expression for X

X A B=

A

BX

LOGIC GATES

Author : Khairi

Combination of possible inputs

22 = 2 x 2 = 4

X A B=A

B

LOGIC GATES

NAND GATE

Author : Khairi

Truth table

A B X A B=

Output for NAND GATE is opposite the output of AND GATE

0 0

X A B=A

B

LOGIC GATES

NAND GATE

Author : Khairi

Truth table

A B X A B=0 0

Input 00 for AND GATE produces 0 outputInverting the output to get the output for AND GATE

10 1

X A B=A

B

LOGIC GATES

NAND GATE

Author : Khairi

Truth table

A B X A B=0 0 10 1 1

X A B=A

B

LOGIC GATES

Input 01 for AND GATE produces 0 outputInverting the output to get the output for AND GATE

NAND GATE

Author : Khairi

Truth table

A B X A B=0 0 10 1 11 0 11 1 0

Corresponding electric circuit

X A B=A

B

LOGIC GATES

NAND GATE

Author : Khairi

EXERCISE

ABC X

Write the Boolean expression for Xand list down all the possible inputs and outputs for the gate in a truth table

LOGIC GATES

Author : Khairi

ABC X = A B C

INPUT OUTPUTA B X00

00

0 10 1

C0101

1 0 01 0 11 1 01 1 1

11111110

LOGIC GATES

EXERCISE

Author : Khairi

OR GATE

AB X

Boolean expression for X

X = A + B

INPUT OUTPUT

A B X

0

0

0

1

1 0

1 1

0

1

1

1

Choose any one high

LOGIC GATES

Author : Khairi

OR GATE

AB X

Boolean expression for X

X = A + B

INPUT OUTPUT

A B X

0

0

0

1

1 0

1 1

0

1

1

1

Corresponding electric circuit

LOGIC GATES

Author : Khairi

AB XC Boolean expression for X

X = A + B + CINPUT OUTPUT

A B X

0

0

0

0

0 1

0 1

C

0

1

0

1

1 0 0

1 0 1

1 1 0

1 1 1

0

1

1

1

1

1

1

1

LOGIC GATESOR GATE

Author : Khairi

NOR GATE

Boolean expression for X

X = A + B

AB X

INPUT OUTPUT

A B X

0

0

0

1

1 0

1 1

1

0

0

0

LOGIC GATES

Author : Khairi

EXERCISE

Write Boolean expression for X.List all possible inputs and outputs for the logic gate in a truth table

PQ XR

INPUT OUTPUT

P Q X

0

0

0

0

0 1

0 1

R

0

1

0

1

1 0 0

1 0 1

1 1 0

1 1 1

X = P + Q + R

1

0

0

0

0

0

0

0

LOGIC GATES

Author : Khairi

COMBINATION OF LOGIC GATES

In the electronic circuit,logic gates are combined into variouscombination to produce a desired output

LOGIC GATES

AND

NAND

AND

Author : Khairi

LOGIC GATES

COMBINATION OF LOGIC GATES

A

B

C

D

X

What is the Boolean expression for X

A B

Author : Khairi

LOGIC GATES

COMBINATION OF LOGIC GATES

A

B

C

D

X

What is the Boolean expression for X

A B

C D

Author : Khairi

LOGIC GATES

COMBINATION OF LOGIC GATES

A

B

C

D

X

What is the Boolean expression for X

A B

C D

A B C D

Author : Khairi

P

QX

Write the Boolean expression for X and state the equivalent basic logic gate.

P + Q

P + Q

PQ X

Equivalent logic gate is NOR GATE

LOGIC GATES

COMBINATION OF LOGIC GATES

Author : Khairi

EXERCISE

PQ

R

S

X

Write the Boolean expression for X

LOGIC GATES

X = P Q R S+ +

Author : Khairi

LOGIC GATES

COMBINATION OF LOGIC GATES

1

0

0

1

X

What is the output,X ?

0

1

0

Author : Khairi

EXERCISE

Build a truth table for the combination of logic gates above

LOGIC GATES

A B X

0

0

1

1

0

1

0

1

0

1

0

0

A

B X

Author : Khairi

EXERCISE

LOGIC GATES

11

11

X

State the output for X

1

0

0

Author : Khairi

LOGIC GATES

EXERCISE

1

1

0

1

X

State the output for X

1

0

1

Author : Khairi

LOGIC GATES

EXERCISE

1

1

0

1

X

State the output for X

1

0

0

Author : Khairi

SERIAL INPUT

State the output for X

X1011

1001

LOGIC GATES

Author : Khairi

1011

1001

1X

LOGIC GATES

State the output for X

SERIAL INPUT

Author : Khairi

1X

1011

1001

0

LOGIC GATES

State the output for X

SERIAL INPUT

Author : Khairi

1X

1011

1001

01

LOGIC GATES

State the output for X

SERIAL INPUT

Author : Khairi

1X

1011

1001

011

LOGIC GATES

State the output for X

SERIAL INPUT

Author : Khairi

1X

1011

1001

011

Output X = 1011

LOGIC GATES

State the output for X

SERIAL INPUT

Author : Khairi

State the output for X

1011

1001 X

1

LOGIC GATES

SERIAL INPUT

Author : Khairi

1011

1001 X

10

LOGIC GATES

State the output for X

SERIAL INPUT

Author : Khairi

1011

1001 X

100

LOGIC GATES

State the output for X

SERIAL INPUT

Author : Khairi

1011

1001 X

1001

Output X = 1001

LOGIC GATES

State the output for X

SERIAL INPUT

Author : Khairi

EXERCISE

LOGIC GATES

1111

1001

1101

0001

X

State the output for X

1111

0001

1111

Author : Khairi

LOGIC GATES

EXERCISE

1111

1001

1101

0001

X

State the output for X

0000

1110

1110

Author : Khairi

LOGIC GATES

EXERCISE

1111

1001

1101

0001

X

State the output for X

0000

1110

0001

Author : Khairi

INPUT FROM TIMING DIAGRAM

LOGIC GATES

1

0

1 1

0 0

The input is 1001

Author : Khairi

X

Draw the output for X on timing diagram

Get the input in binary number

1 0 1

0 0 1

Get the output in binary number

= 101

Draw the timing diagram for output X

LOGIC GATES

INPUT FROM TIMING DIAGRAM

Author : Khairi

INPUT P

INPUT Q

OUTPUT X

If P and Q are the inputs

of AND GATE.Draw the output X

LOGIC GATES

INPUT FROM TIMING DIAGRAM

Author : Khairi

EXERCISE

Draw the output if the inputs are fed to NOR GATE

1 0 1 1 1 0 0

0 0 1 1 0 1 0

0 1 0 0 0 0 1

LOGIC GATES

Author : Khairi

EXERCISE

Draw the output X

LOGIC GATES

X

Author : Khairi

ENRICHMENT PRACTICEENRICHMENT PRACTICE

Light sensor

Body heat sensor

P

QX

Relay switch

Security lamp

Name the logic gate P.

NOT gate

Author : Khairi

ENRICHMENT PRACTICEENRICHMENT PRACTICE

Light sensor

Body heat sensor

P

QX

Relay switch

Security lamp

Q is AND gate.Draw the AND gate by using two switches,batteries and lamp.

Author : Khairi

ENRICHMENT PRACTICEENRICHMENT PRACTICE

Light sensor

Body heat sensor

P

QX

Relay switch

Security lamp

Complete the truth table below for output X.

Input light sensor Input body heat sensor Output X

0

0

1

1

0

1

0

1

0

1

0

0

Author : Khairi

ENRICHMENT PRACTICEENRICHMENT PRACTICE

Light sensor

Body heat sensor

P

QX

Relay switch

Security lamp

State the function of the relay switch in the circuit.

To switch on or off the security lamp.

Author : Khairi

Which of the following truth tables represents output R in the circuit ?

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

Which of the following truth tables represents output R in the circuit ?

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

What is the get X which produces the output in the truth table ?

A. AND

B. OR

C. NAND

D. NOR

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

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

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

Which of the following output signals is produced by the logic gate circuit ?

A. B. C. D.

0101

1001

1110

0110

1110

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

PAST YEARS QUESTIONPAST YEARS QUESTION

Which truth table is correct ?

Author : Khairi

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 S2Output P

0

1

1

0

0

1

0

1

0

S1 S2Output Q

0

1

1

0

0

1

1

1

1

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

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 radiationdue to less penetration of radioactive radiation

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

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 radiationdue to higher penetration of radioactive radiation

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

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 volumeis acceptable

PAST YEARS QUESTIONPAST YEARS QUESTION

Author : Khairi

PAST YEARS QUESTIONPAST YEARS QUESTION

output

What is the output ?

Recommended