45
CS 221 Computer Organization Lecture 2 Digital Logic

02 combinational logic

Embed Size (px)

Citation preview

Page 1: 02 combinational logic

CS 221Computer Organization

Lecture 2Digital Logic

Page 2: 02 combinational logic

2

This Lecture

Binary Storage Registers Binary Logic Boolean Algebra Boolean Algebra Functions Boolean Function Implementation Canonical & Standard Forms Gate Level Minimization

Page 3: 02 combinational logic

3

Binary storage & registers

How do we store binary information?

Binary cell : place to store one bit of information. 0 or 1.

Register: a group of binary cells.

Register transfer: An operation in a digital system

Page 4: 02 combinational logic

4

Binary storage & registers

Page 5: 02 combinational logic

5

Binary information processing

Example: Add two 10-bit binary numbers

Page 6: 02 combinational logic

6

Binary logic

Binary logic deals with variables that take on two discrete values and operations that assume logical meaning.

Logic gates: electronic circuits that operate on one or more input signals to produce an output signal.

Example x y x AND y0 0 00 1 01 0 01 1 1

Page 7: 02 combinational logic

7

Electrical signals

Two values: 0 or 1

Page 8: 02 combinational logic

8

Symbols for digital logic circuits

Page 9: 02 combinational logic

9

Input-Output signals for gates

Page 10: 02 combinational logic

10

Gates with multiple inputs

Page 11: 02 combinational logic

11

Boolean Algebra

Basic definitions:

x+0=0+x=x x.1=1.x=x x.(y+z)=(x.y)+(x.z) x+(y.z)=(x+y).(x+z) x+x’=1 x.x’=0

Page 12: 02 combinational logic

12

Boolean Algebra Theorems

x+x=x x.x=x x+1=1 x.0=0 x+x.y=x x.(x+y)=x

Page 13: 02 combinational logic

13

Boolean Algebra Functions

examples: F1=x+y’.z

F2=x’.y’.z+x’.y.z+x.y’ =x’.z(y’+y)+x.y’ F2=x’.z+x.y’

A Boolean Function can be represented in many algebraic forms

We look for the most simple form

Page 14: 02 combinational logic

14

Boolean Function: Example

Truth table

x y z F1 F2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0

A Boolean Function can be represented in only one truth table forms

Page 15: 02 combinational logic

15

Boolean Function Implementation

y’

Y’.z

Page 16: 02 combinational logic

16

Boolean Function Implementation

X’.y’.z

X’.y.z

X.y’

X.y’

X’.z

Page 17: 02 combinational logic

17

Canonical & Standard Forms

Consider two binary variables x, y and the AND operation four combinations are possible: x.y, x’.y, x.y’, x’.y’ each AND term is called a minterm or standard products

for n variables we have 2n minterms

Consider two binary variables x, y and the OR operation four combinations are possible: x+y, x’+y, x+y’, x’+y’ each OR term is called a maxterm or standard sums

for n variables we have 2n maxterms

Canonical Forms: Boolean functions expressed as a sum of minterms or product of

maxterms.

Page 18: 02 combinational logic

18

Minterms

x y z Terms Designation

0 0 0 x’.y’.z’ m0 0 0 1 x’.y’.z m1 0 1 0 x’.y.z’ m2 0 1 1 x’.y.z m3 1 0 0 x.y’.z’ m4 1 0 1 x.y’.z m5 1 1 0 x.y.z’ m6 1 1 1 x.y.z m7

Page 19: 02 combinational logic

19

Maxterms

x y z Designation Terms 0 0 0 M0

x+y+z 0 0 1 M1

x+y+z’ 0 1 0 M2

x+y’+z 0 1 1 M3

x+y’+z’ 1 0 0 M4

x’+y+z 1 0 1 M5

x’+y+z’ 1 1 0 M6

x’+y’+z 1 1 1 M7

x’+y’+z’

Page 20: 02 combinational logic

20

Boolean Function: Exampl

How to express algebraically

Question: How do we find the function using the truth table?

Truth table example: x y z F1 F2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0

Page 21: 02 combinational logic

21

Boolean Function: Exampl

How to express algebraically

1.Form a minterm for each combination forming a 1 2.OR all of those terms

Truth table example: x y z F1 minterm 0 0 0 0 0 0 1 1 x’.y’.z

m1 0 1 0 0 0 1 1 0 1 0 0 1 x.y’.z’

m4 1 0 1 0 1 1 0 0 1 1 1 1 x.y.z

m7

F1=m1+m4+m7=x’.y’.z+x.y’.z’+x.y.z=Σ(1,4,7)

Page 22: 02 combinational logic

22

Boolean Function: Exampl

How to express algebraically

Truth table example: x y z F2 minterm 0 0 0 0 m0 0 0 1 0 m1 0 1 0 0 m2 0 1 1 1 m3 1 0 0 0 m4 1 0 1 1 m5 1 1 0 1 m6 1 1 1 1 m7

F2=m3+m5+m6+m7=x’.y.z+x.y’.z+x.y.z’+x.y.z=Σ(3,5,6,7)

Page 23: 02 combinational logic

23

Boolean Function: Exampl

How to express algebraically

1.Form a maxterm for each combination forming a 0 2.AND all of those terms

Truth table example: x y z F1 maxterm 0 0 0 0 x+y+z M0 0 0 1 1 0 1 0 0 x+y’+z M2 0 1 1 0 x+y’+z’ M3 1 0 0 1 1 0 1 0 x’+y+z’

M5 1 1 0 0 x’+y’+z M6 1 1 1 1

F1=M0.M2.M3.M5.M6 = л(0,2,3,5,6)

Page 24: 02 combinational logic

24

Boolean Function: Exampl

How to express algebraically

Truth table example: x y z F2 maxterm 0 0 0 0 x+y+z M0 0 0 1 0 x+y+z’

M1 0 1 0 0 x+y’+z

M2 0 1 1 1 1 0 0 0 x’+y+z M4 1 0 1 1 1 1 0 1 1 1 1 1

F=M0.M1.M2.M4=л(0,1,2,4)=(x+y+z).(x+y+z’).(x+y’+z).(x’+y+z)

Page 25: 02 combinational logic

25

Maxterms & Minterms: Intuitions

Minterms: If a function is expressed as SUM of PRODUCTS, then if

a single product is 1 the function would be 1.

Maxterms: If a function is expressed as PRODUCT of SUMS, then if

a single product is 0 the function would be 0.

Canonical Forms: Boolean functions expressed as a sum of minterms or

product of maxterms.

Page 26: 02 combinational logic

26

Standard Forms

Standard From: Sum of Product or Product of Sum

Page 27: 02 combinational logic

27

Nonstandard Forms

Nonstandard From: Neither a Sum of Product nor Product of Sum

Page 28: 02 combinational logic

28

Implementations

Three-level implementation vs. two-level implementation

Two-level implementation normally preferred due to delay importance.

Page 29: 02 combinational logic

29

Digital Logic Gates

Page 30: 02 combinational logic

30

Integrated Circuits (ICs)

Levels of Integration

SSI: fewer than 10 gates on chip MSI:10 to 1000 gates on chip LSI: thousands of gates on chip VLSI:Millions of gates on chip

Digital Logic Families TTL transistor-transistor logic ECL emitter-coupled logic MOS metal-oxide semiconductor CMOS complementary metal-oxide semiconductor

Page 31: 02 combinational logic

31

Digital Logic Parameters

Fan-out: maximum number of output signals Fan-in : number of inputs

Power dissipation Propagation delay Noise margin: maximum noise

Page 32: 02 combinational logic

32

Gate-Level Minimization

The Map Method: A simple method for minimizing Boolean functions

Map: diagram made up of squares Each square represents a minterm

Page 33: 02 combinational logic

33

Two-Variable Map

Page 34: 02 combinational logic

34

Two-Variable Map

Maps representing x.y and x+y

Page 35: 02 combinational logic

35

Three-Variable Map

Minterms are not arranged in a binary sequenceMinterms arranged in gray code: Only one bit changes from one column to the next

Page 36: 02 combinational logic

36

Three-Variable Map-example 1

Sum of two adjacent minterms can be simplified to a single AND term consisting of two literals

Page 37: 02 combinational logic

37

Three-Variable Map-example 2

Page 38: 02 combinational logic

38

Three-Variable Map-example 3

Page 39: 02 combinational logic

39

Three-Variable Map-example 4

Page 40: 02 combinational logic

40

Four-Variable Map

Page 41: 02 combinational logic

41

Four-Variable Map-example 1

1

Page 42: 02 combinational logic

42

Four-Variable Map-example 2

Page 43: 02 combinational logic

43

Graphic symbols for NAND gates

Page 44: 02 combinational logic

44

Summary

Logic Gates Combinational Circuit Integrated Circuits Gate Level Minimization

Page 45: 02 combinational logic

45

Recommended Reading

• Read textbook & readings• Solve exercises• Digital Design

Fifth edition,

by Morris Mano, Prentice Hall Publishers