acoe1611 combinational logic circuits reference: m. mano, c. kime, “logic and computer design...

24
ACOE161 1 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

Upload: matilda-morton

Post on 04-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 1

Combinational Logic Circuits

Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

Page 2: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 2

Basic Logic Gates

Buffer AND OR EX-OR

A X X X XA A A

BBB

X = A X = A B X = A + B X = A + B

A X0 0

11

A X0

0

1

10

001

1 1

0

0

B A X0

1

1

10

001

1 1

0

1

B A X0

1

0

10

001

1 1

0

1

B

Truth Table

Logic Expression

Gate Symbol

Logic Function

Page 3: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 3

Basic Logic Gates with Inverted Outputs

NOT NAND NOR EX-NOR

A X X X XA A A

BBB

X = A X = A B X = A + B X = A + B

A X0

01

1

A X0

01

10

001

1 1 00

B A X0 1

1 10

001

1 1

01

B A X0 1

010

001

1 1

0

1

B

Page 4: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 4

Logic Gates with more than two inputs

3-Input AND Gate

3-Input OR Gate

4-Input AND Gate 4-Input OR Gate

Page 5: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 5

Circuit Implementation of a Logic Expression with Gates

X = A + BC

Logic Function A

B

C BC

BX

Logic Diagram with Gates

X = (A + B)C

Logic Function A

B

C

A+BB

X

Logic Diagram with Gates

Page 6: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 6

Circuit Implementation of Logic Expressions:- Examples

X = A(B+C)+BC

Logic Function

Logic Diagram with GatesExample 1

X = (AB+C)B+C

Logic Function

Logic Diagram with GatesExample 2

Page 7: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 7

Circuit Implementation of Logic Expressions:- Homework

X = (AB+C)(B+C)

Logic Function

Logic Diagram with GatesHomework 1

X = (ABC+C)B+AC

Logic Function

Logic Diagram with GatesHomework 2

Page 8: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 8

Truth Tables

Truth table of a logic circuit is a table showing all the possible input combinations with the

corresponding value of the output. Examples:

A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

X

0

0

0

1

1

1

1

0

(a) Show the truth table of a 3-input circuitthat gives at its output a logic 1 if the inputforms a number between 3 and 6.

Inputs Output

0

1

2

3

4

5

6

7

(b) Show the truth table of the logic expression:

A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

AB C AB + C

0

0

0

0

1 1

0

1

1

0

1

1

0

1

0 0

0

00

1 1

1 0 1

X = (AB+C)(A+C)

1

1

1

1

0

0

0

1

1

1

1

1

0

0

1

1

A + C

X = (AB + C)(A + C)

Page 9: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 9

Truth Tables: Examples

X = (AB + C)(A + C)

A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

A B C

1

1

1

1

1 1

1

1

1

1

1

1

0

0

0 0

0

00

0 0

0 0 0

Page 10: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 10

Minterms and maxterms

Page 11: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 11

Standard forms: Sum of Products

X = ABC + ABC + ABC + ABC

A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

A B C

1

1

1

1

1 1

1

1

1

1

1

1

0

0

0 0

0

00

0 0

0 0 0

Page 12: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 12

Logic expression and truth table of a logic circuit

AB

CX

T1 =

T2 =

T3 =

T4 =

A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

0

1

2

3

4

5

6

7

T1 T2 T3 T4 X

Logic Expression: X =

SoP Form: X =

PoS Form: X =

Page 13: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 13

Example: Find the logic expression and fill up the truth table for the circuit below.

AB

CX

T1 =

T2 =

T3 =

T4 =

A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

0

1

2

3

4

5

6

7

T1 T2 T3 T4 X

X =

Page 14: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 14

Homework: Find the logic expression and fill up the truth table for the circuit below.

AB

C

X

T1=

T2 =

T3 =

T4 =

A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

0

1

2

3

4

5

6

7

T1 T2 T3 T4 X

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

8

9

10

11

12

13

14

15

1

1

1

1

1

1

1

1

0

0

0

0

0

0

0

0T5 =D

T5D

Logic Expression: X =

SoP Form: X =

PoS Form: X =

Page 15: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 15

Analyzing a logic circuit using timing diagrams

A

B

CX

T1 =T2 =

T3 =

T4 =

A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

0

1

2

3

4

5

6

7

T1 T2 T3 T4 X

A

B

C

X

Logic 0

Logic 1

Page 16: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 16

Homework: Fill up the truth table and timing diagram for the circuit below.

A

B

C

X

T1 =T2 =

T3 =

T4 =A B C

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

0

1

2

3

4

5

6

7

T1 T2 T3 T4 X

A

B

C

X

T5 =

T5

Page 17: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 17

Boolean Algebra

1. X 0 X 3. X 1 1

5. X X X

7. X X 1

2. X 0 0

4. X 1 X

6. X X X

8. X X 0

9. X X 10. X X11. X( XZY Z XY ) 12. X + Z)YZ X Y X ( )(

13. X +Y X Y 14. X Y X Y15. X Y + XY XY 16. X Y + X Y XY

17. X + XY +YX 18. X + XY +YX

Basic Boolean identities:

Page 18: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 18

Boolean Algebra (Examples)

1. X XY X

3. XY XY X

5. XY XZ + YZ = XY + XZ

7. AB +AB+AB 1

2. X(X + Y) X

4. (X +Y)(X +Y) X

6. (X + Y)(X X + Y)(X Z Y Z Z)( ) ( )

8. XYZ X +Y + Z

9. AB AB AB A B 10. AB A B AB AB

Prove the following identities using Boolean algebra and truth tables:

Page 19: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 19

Digital circuit simplification using Boolean algebra

• Logic functions are simplified in order to reduce the number of gates required to implement them. Thus the circuit will

– cost less,– need less space and power, – be build faster with less effort.

• For example the expression F needs six gates to be build. If the expression is simplified then the function can be implemented with only two gates.

F = XYZ + XYZ XYZ YZ(X X) XYZ YZ XYZ Y(Z XZ) F Y(Z X)

F = XYZ+ XYZ XYZ F Y(Z X)

X

Y

Z

F

F

XZ

Y

Page 20: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 20

Boolean Algebra (Examples)

1. F = XY Z XYZ XZ 2. F = X YZ + XYZ + Y

Simplify the expressions given below. Use truth tables to verify your results.

X Y Z

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

X Y Z

1

1

1

1

1 1

1

1

1

1

1

1

0

0

0 0

0

00

0 0

0 0 0

X Y Z

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

X Y Z

1

1

1

1

1 1

1

1

1

1

1

1

0

0

0 0

0

00

0 0

0 0 0

Page 21: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 21

Boolean Algebra (Examples - Cont.)

3. F = (X +Y + Z X Y Z)( ) 4. F = (X +Y + Z)(X + Z)

Simplify the expressions given below. Use truth tables to verify your results.

X Y Z

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

X Y Z

1

1

1

1

1 1

1

1

1

1

1

1

0

0

0 0

0

00

0 0

0 0 0

X Y Z

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

X Y Z

1

1

1

1

1 1

1

1

1

1

1

1

0

0

0 0

0

00

0 0

0 0 0

Page 22: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 22

Boolean Algebra (Examples - Cont.)

5. F = XY X YZ + (Y + Z)

Simplify the expression given below. Use truth tables to verify your results.

X Y Z

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

X Y Z

1

1

1

1

1 1

1

1

1

1

1

1

0

0

0 0

0

00

0 0

0 0 0

Page 23: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 23

Boolean Algebra (Examples - Cont.)

6. F = (X + Y X)( )( ) Z Y Z

Simplify the expression given below. Use truth tables to verify your results.

X Y Z

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

1

1

X Y Z

1

1

1

1

1 1

1

1

1

1

1

1

0

0

0 0

0

00

0 0

0 0 0

Page 24: ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2

ACOE161 24

Digital circuit Examples with 1 output