67
Author : Khairi LOGIC GATES Logic gate 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

68.logic gates

  • Upload
    ryan-ko

  • View
    285

  • Download
    1

Embed Size (px)

DESCRIPTION

24.logic gates

Citation preview

Page 1: 68.logic gates

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

Page 2: 68.logic gates

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

Page 3: 68.logic gates

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

Page 4: 68.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

Page 5: 68.logic gates

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

Page 6: 68.logic gates

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

Page 7: 68.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

Page 8: 68.logic gates

Author : Khairi

AND GATE (3 inputs)

Boolean expression for X

X = A B C

A B C=

A

B X

C

LOGIC GATES

Page 9: 68.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)

Page 10: 68.logic gates

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)

Page 11: 68.logic gates

Author : Khairi

NAND GATE

Boolean expression for X

X A B=

A

BX

LOGIC GATES

Page 12: 68.logic gates

Author : Khairi

Combination of possible inputs

22 = 2 x 2 = 4

X A B=A

B

LOGIC GATES

NAND GATE

Page 13: 68.logic gates

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

Page 14: 68.logic gates

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

Page 15: 68.logic gates

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

Page 16: 68.logic gates

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

Page 17: 68.logic gates

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

Page 18: 68.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

Page 19: 68.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

Choose any one high

LOGIC GATES

Page 20: 68.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

Page 21: 68.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

Page 22: 68.logic gates

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

Page 23: 68.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

Page 24: 68.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

Page 25: 68.logic gates

Author : Khairi

LOGIC GATES

COMBINATION OF LOGIC GATES

A

B

C

D

X

What is the Boolean expression for X

A B

Page 26: 68.logic gates

Author : Khairi

LOGIC GATES

COMBINATION OF LOGIC GATES

A

B

C

D

X

What is the Boolean expression for X

A B

C D

Page 27: 68.logic gates

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

Page 28: 68.logic gates

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

Page 29: 68.logic gates

Author : Khairi

EXERCISE

PQ

R

S

X

Write the Boolean expression for X

LOGIC GATES

X = P Q R S+ +

Page 30: 68.logic gates

Author : Khairi

LOGIC GATES

COMBINATION OF LOGIC GATES

1

0

0

1

X

What is the output,X ?

0

1

0

Page 31: 68.logic gates

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

Page 32: 68.logic gates

Author : Khairi

EXERCISE

LOGIC GATES

11

11

X

State the output for X

1

0

0

Page 33: 68.logic gates

Author : Khairi

LOGIC GATES

EXERCISE

1

1

0

1

X

State the output for X

1

0

1

Page 34: 68.logic gates

Author : Khairi

LOGIC GATES

EXERCISE

1

1

0

1

X

State the output for X

1

0

0

Page 35: 68.logic gates

Author : Khairi

SERIAL INPUT

State the output for X

X1011

1001

LOGIC GATES

Page 36: 68.logic gates

Author : Khairi

1011

1001

1X

LOGIC GATES

State the output for X

SERIAL INPUT

Page 37: 68.logic gates

Author : Khairi

1X

1011

1001

0

LOGIC GATES

State the output for X

SERIAL INPUT

Page 38: 68.logic gates

Author : Khairi

1X

1011

1001

01

LOGIC GATES

State the output for X

SERIAL INPUT

Page 39: 68.logic gates

Author : Khairi

1X

1011

1001

011

LOGIC GATES

State the output for X

SERIAL INPUT

Page 40: 68.logic gates

Author : Khairi

1X

1011

1001

011

Output X = 1011

LOGIC GATES

State the output for X

SERIAL INPUT

Page 41: 68.logic gates

Author : Khairi

State the output for X

1011

1001 X

1

LOGIC GATES

SERIAL INPUT

Page 42: 68.logic gates

Author : Khairi

1011

1001 X

10

LOGIC GATES

State the output for X

SERIAL INPUT

Page 43: 68.logic gates

Author : Khairi

1011

1001 X

100

LOGIC GATES

State the output for X

SERIAL INPUT

Page 44: 68.logic gates

Author : Khairi

1011

1001 X

1001

Output X = 1001

LOGIC GATES

State the output for X

SERIAL INPUT

Page 45: 68.logic gates

Author : Khairi

EXERCISE

LOGIC GATES

1111

1001

1101

0001

X

State the output for X

1111

0001

1111

Page 46: 68.logic gates

Author : Khairi

LOGIC GATES

EXERCISE

1111

1001

1101

0001

X

State the output for X

0000

1110

1110

Page 47: 68.logic gates

Author : Khairi

LOGIC GATES

EXERCISE

1111

1001

1101

0001

X

State the output for X

0000

1110

0001

Page 48: 68.logic gates

Author : Khairi

INPUT FROM TIMING DIAGRAM

LOGIC GATES

1

0

1 1

0 0

The input is 1001

Page 49: 68.logic gates

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

Page 50: 68.logic gates

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

Page 51: 68.logic gates

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

Page 52: 68.logic gates

Author : Khairi

EXERCISE

Draw the output X

LOGIC GATES

X

Page 53: 68.logic gates

Author : Khairi

ENRICHMENT PRACTICEENRICHMENT PRACTICE

Light sensor

Body heat sensor

P

QX

Relay switch

Security lamp

Name the logic gate P.

NOT gate

Page 54: 68.logic gates

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.

Page 55: 68.logic gates

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

Page 56: 68.logic gates

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.

Page 57: 68.logic gates

Author : Khairi

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

PAST YEARS QUESTIONPAST YEARS QUESTION

Page 58: 68.logic gates

Author : Khairi

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

PAST YEARS QUESTIONPAST YEARS QUESTION

Page 59: 68.logic gates

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

Page 60: 68.logic gates

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

Page 61: 68.logic gates

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

Page 62: 68.logic gates

Author : Khairi

PAST YEARS QUESTIONPAST YEARS QUESTION

Which truth table is correct ?

Page 63: 68.logic gates

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

Page 64: 68.logic gates

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

Page 65: 68.logic gates

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

Page 66: 68.logic gates

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

Page 67: 68.logic gates

Author : Khairi

PAST YEARS QUESTIONPAST YEARS QUESTION

output

What is the output ?