Logic gates

19
Simple digital circuit 1

Transcript of Logic gates

Page 1: Logic gates

Simple digital

circuit

1

Page 2: Logic gates

AND Function Output Y is TRUE if inputs A AND B are

TRUE, else it is FALSE.

Logic Symbol

Text Description

Truth Table

Boolean Expression

AND

A

B Y

INPUTS OUTPUT

A B Y

0 0 0

0 1 0

1 0 0

1 1 1 AND Gate Truth Table

Y = A x B = A • B = AB

AND Symbol

2

Page 3: Logic gates

OR Function Output Y is TRUE if input A OR B is

TRUE, else it is FALSE.

Logic Symbol

Text Description

Truth Table

Boolean Expression Y = A + B

OR Symbol

A

B Y OR

INPUTS OUTPUT

A B Y

0 0 0

0 1 1

1 0 1

1 1 1 OR Gate Truth Table

3

Page 4: Logic gates

Draw the symbol for logic

1

3

2

4

Page 5: Logic gates

NOT Function (inverter) Output Y is TRUE if input A is FALSE,

else it is FALSE. Y is the inverse of A.

Logic Symbol

Text Description

Truth Table

Boolean Expression

INPUT OUTPUT

A Y

0 1

1 0 NOT Gate Truth Table

A Y NOT

NOT

Bar

Y = A

Y = A’

Alternative Notation

Y = !A

5

Page 6: Logic gates

NAND Function Output Y is FALSE if inputs A AND B

are TRUE, else it is TRUE.

Logic Symbol

Text Description

Truth Table

Boolean Expression

A

B Y NAND

A bubble is an inverter

This is an AND Gate with an inverted output

Y = A x B = AB

INPUTS OUTPUT

A B Y

0 0 1

0 1 1

1 0 1

1 1 0 NAND Gate Truth Table

6

Page 7: Logic gates

NOR Function Output Y is FALSE if input A OR B is

TRUE, else it is TRUE.

Logic Symbol

Text Description

Truth Table

Boolean Expression Y = A + B

A

B Y NOR

A bubble is an inverter.

This is an OR Gate with its output inverted.

INPUTS OUTPUT

A B Y

0 0 1

0 1 0

1 0 0

1 1 0 NOR Gate Truth Table

7

Page 8: Logic gates

Individual work

8

Page 9: Logic gates

Circuit-to-Truth Table Example

OR

A

Y

NOT

AND

B

C AND

2# of Inputs = # of Combinations

2 3 = 8

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

9

Page 10: Logic gates

Circuit-to-Truth Table Example

OR

A

Y

NOT

AND

B

C AND

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

0

0

0

0

1 0

0

0

10

Page 11: Logic gates

Circuit-to-Truth Table Example

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

0

OR

A

Y

NOT

AND

B

C AND

0

0

1

0

1 1

1

1

11

Page 12: Logic gates

Circuit-to-Truth Table Example

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

0 1 0

OR

A

Y

NOT

AND

B

C AND

0

1

0

0

1 0

0

0

12

Page 13: Logic gates

Circuit-to-Truth Table Example

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

0 1 0

0

OR

A

Y

NOT

AND

B

C AND

0

1

1

0

1 1

1

1

13

Page 14: Logic gates

Circuit-to-Truth Table Example

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

0 1 0 1

0

OR

A

Y

NOT

AND

B

C AND

1

0

0

0

0 0

0

0

14

Page 15: Logic gates

Circuit-to-Truth Table Example

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

0 1 0 1 0

0

OR

A

Y

NOT

AND

B

C AND

1

0

1

0

0 0

0

0

15

Page 16: Logic gates

Circuit-to-Truth Table Example

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

0 1 0 1 0 0

0

OR

A

Y

NOT

AND

B

C AND

1

1

0

1

0 0

1

1

16

Page 17: Logic gates

Circuit-to-Truth Table Example

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

0 1 0 1 0 0 1

0

OR

A

Y

NOT

AND

B

C AND

1

1

1

1

0 0

1

1 17

Page 18: Logic gates

Group work

18

Page 19: Logic gates

19