Chapter 3

96
Chapter 3 Boolean Algebra and Combinational Logic

description

Chapter 3. Boolean Algebra and Combinational Logic. Logic Gate Network. Two or more logic gates connected together. Described by truth table, logic diagram, or Boolean expression. Logic Gate Network. Boolean Expression for Logic Gate Network. - PowerPoint PPT Presentation

Transcript of Chapter 3

Page 1: Chapter 3

Chapter 3

Boolean Algebra and Combinational Logic

Page 2: Chapter 3

2

Logic Gate Network

• Two or more logic gates connected together.

• Described by truth table, logic diagram, or Boolean expression.

Page 3: Chapter 3

3

Logic Gate Network

Page 4: Chapter 3

4

Boolean Expression for Logic Gate Network

• Similar to finding the expression for a single gate.

• Inputs may be compound expressions that represent outputs from previous gates.

Page 5: Chapter 3

5

Boolean Expression for Logic Gate Network

Page 6: Chapter 3

6

Bubble-to-Bubble Convention

• Choose gate symbols so that outputs with bubbles connect to inputs with bubbles.

• Results in a cleaner notation and a clearer idea of the circuit function.

Page 7: Chapter 3

7

Bubble-to-Bubble Convention

Page 8: Chapter 3

8

Order of Precedence

• Unless otherwise specified, in Boolean expressions AND functions are performed first, followed by ORs.

• To change the order of precedence, use parentheses.

Page 9: Chapter 3

9

Order of Precedence

Page 10: Chapter 3

10

Simplification by Double Inversion

• When two bubbles touch, they cancel out.

• In Boolean expressions, bars of the same length cancel.

Page 11: Chapter 3

11

Logic Diagrams from Boolean Expressions

• Use order of precedence.

• A bar over a group of variables is the same as having those variables in parentheses.

Page 12: Chapter 3

12

Logic Diagrams from Boolean Expressions

Page 13: Chapter 3

13

Truth Tables from Logic Diagrams or Boolean Expressions

• Two methods:– Combine individual truth tables from each

gate into a final output truth table.– Develop a Boolean expression and use it

to fill in the truth table.

Page 14: Chapter 3

14

Truth Tables from Logic Diagrams or Boolean Expressions

Page 15: Chapter 3

15

Truth Tables from Logic Diagrams or Boolean Expressions

Page 16: Chapter 3

16

Circuit Description Using Boolean Expressions

• Product term:– Part of a Boolean expression where one or

more true or complement variables are ANDed.

• Sum term:– Part of a Boolean expression where one or

more true or complement variables are ORed.

Page 17: Chapter 3

17

Circuit Description Using Boolean Expressions

• Sum-of-products (SOP):– A Boolean expression where several

product terms are summed (ORed) together.

• Product-of-sum (POS):– A Boolean expression where several sum

terms are multiplied (ANDed) together.

Page 18: Chapter 3

18

Examples of SOP and POS Expressions

)()()( :POS

:SOP

CACBBAY

DACBABY

Page 19: Chapter 3

19

SOP and POS Utility

• SOP and POS formats are used to present a summary of the circuit operation.

Page 20: Chapter 3

20

Bus Form

• A schematic convention in which each variable is available, in true or complement form, at any point along a conductor.

Page 21: Chapter 3

21

Bus Form

Page 22: Chapter 3

22

Deriving a SOP Expression from a Truth Table

• Each line of the truth table with a 1 (HIGH) output represents a product term.

• Each product term is summed (ORed).

Page 23: Chapter 3

23

Deriving a POS Expression from a Truth Table

• Each line of the truth table with a 0 (LOW) output represents a sum term.

• The sum terms are multiplied (ANDed).

Page 24: Chapter 3

24

Deriving a POS Expression from a Truth Table

Page 25: Chapter 3

25

Theorems of Boolean Algebra

• Used to minimize a Boolean expression to reduce the number of logic gates in a network.

• 24 theorems.

Page 26: Chapter 3

26

Commutative Property

• The operation can be applied in any order with no effect on the result.– Theorem 1: xy = yx– Theorem 2: x + y = y + x

Page 27: Chapter 3

27

Associative Property

• The operands can be grouped in any order with no effect on the result.– Theorem 3: (xy)z = x(yz) = (xz)y– Theorem 4: (x + y) + z = x + (y + z) = (x + z) + y

Page 28: Chapter 3

28

Distributive Property

• Allows distribution (multiplying through) of AND across several OR functions.

• Theorem 5: x(y + z) = xy + xz• Theorem 6: (x + y)(w + z) = xw + xz + yw + yz

Page 29: Chapter 3

29

Distributive Property

Page 30: Chapter 3

30

Operations with Logic 0

• Theorem 7: x 0 = 0

• Theorem 8: x + 0 = x

• Theorem 9: x 0 = x

Page 31: Chapter 3

31

Operations with Logic 1

• Theorem 10: x 1 = x

• Theorem 11: x + 1 = 1

• xx 1 :12Theorem

Page 32: Chapter 3

32

Operations with Logic 1

Page 33: Chapter 3

33

Operations with the Same Variable

• Theorem 13: x x = x

• Theorem 14: x + x = x

• Theorem 15: x x = 0

Page 34: Chapter 3

34

Operations with the Complement of a Variable

• 1 :18 Theorem

1 :17 Theorem

0 :16 Theorem

xx

xx

xx

Page 35: Chapter 3

35

Operations with the Complement of a Variable

Page 36: Chapter 3

36

Double Inversion

• xx :19 Theorem

Page 37: Chapter 3

37

DeMorgan’s Theorem

• yxyx

yxyx

:21 Theorem

: 20 Theorem

Page 38: Chapter 3

38

Multivariable Theorems

• Theorem 22: x + xy = x

• Theorem 23: (x + y)(x + y) = x + yz

• yxxyx :24 Theorem

Page 39: Chapter 3

39

Multivariable Theorems

Page 40: Chapter 3

40

Simplifying SOP and POS Expressions

• A Boolean expression can be simplified by:– Applying the Boolean Theorems to the

expression– Application of graphical tool called a

Karnaugh map (K-map) to the expression

Page 41: Chapter 3

41

Simplifying an Expression

BAY

xx

BAY

x

CBAY

BA

CBABAY

) 1 ( :10 theorem applying

1

1) (1 :11 theorem applying

) (1

term common the out factoring

Page 42: Chapter 3

42

Simplifying an Expression

AY

AY

x

CBAY

A

ACBAY

ACBAY

ACBAY

(1)

1 1 :11theoremapplying

1) (1

outfactoring

20theoremsDeMorgan'applying

) (

20theoremsDeMorgan'applying

) (

Page 43: Chapter 3

43

Simplification By Karnaugh Mapping

• A Karnaugh map, called a K-map, is a graphical tool used for simplifying Boolean expressions.

Page 44: Chapter 3

44

Construction of a Karnaugh Map

• Square or rectangle divided into cells.

• Each cell represents a line in the truth table.

• Cell contents are the value of the output variable on that line of the truth table.

Page 45: Chapter 3

45

Construction of a Karnaugh Map

Page 46: Chapter 3

46

Construction of a Karnaugh Map

Page 47: Chapter 3

47

Construction of a Karnaugh Map

Page 48: Chapter 3

48

K-map Cell Coordinates

• Adjacent cells differ by only one variable.

• Grouping adjacent cells allows canceling variables in their true and complement forms.

Page 49: Chapter 3

49

Grouping Cells

• Cells can be grouped as pairs, quads, and octets.

• A pair cancels one variable.

• A quad cancels two variables.

• An octet cancels three variables.

Page 50: Chapter 3

50

Grouping Cells

Page 51: Chapter 3

51

Grouping Cells

Page 52: Chapter 3

52

Grouping Cells

Page 53: Chapter 3

53

Grouping Cells along the Outside Edge

• The cells along an outside edge are adjacent to cells along the opposite edge.

• In a four-variable map, the four corner cells are adjacent.

Page 54: Chapter 3

54

Grouping Cells along the Outside Edge

Page 55: Chapter 3

55

Loading a K-Map from a Truth Table

• Each cell of the K-map represents one line from the truth table.

• The K-map is not laid out in the same order as the truth table.

Page 56: Chapter 3

56

Loading a K-Map from a Truth Table

Page 57: Chapter 3

57

Loading a K-Map from a Truth Table

Page 58: Chapter 3

58

Multiple Groups

• Each group is a term in the maximum SOP expression.

• A cell may be grouped more than once as long as every group has at least one cell that does not belong to any other group. Otherwise, redundant terms will result.

Page 59: Chapter 3

59

Multiple Groups

Page 60: Chapter 3

60

Maximum Simplification

• Achieved if the circled group of cells on the K-map are as large as possible.

• There are as few groups as possible.

Page 61: Chapter 3

61

Maximum Simplification

Page 62: Chapter 3

62

Using K-Maps for Partially Simplified Circuits

• Fill in the K-map from the existing product terms.

• Each product term that is not a minterm will represent more than one cell.

• Once completed, regroup the K-map for maximum simplification.

Page 63: Chapter 3

63

Using K-Maps for Partially Simplified Circuits

Page 64: Chapter 3

64

Using K-Maps for Partially Simplified Circuits

Page 65: Chapter 3

65

Don’t Care States

• The output state of a circuit for a combination of inputs that will never occur.

• Shown in a K-map as an “x”.

Page 66: Chapter 3

66

Value of Don’t Care States

• In a K-map, set “x” to a 0 or a 1, depending on which case will yield the maximum simplification.

Page 67: Chapter 3

67

Value of Don’t Care States

Page 68: Chapter 3

68

POS Simplification Using Karnaugh Mapping

• Group those cells with values of 0.

• Use the complements of the cell coordinates as the sum term.

Page 69: Chapter 3

69

POS Simplification Using Karnaugh Mapping

Page 70: Chapter 3

70

Bubble-to-Bubble Convention – Step 1

• Start at the output and work towards the input.

• Select the OR gate as the last gate for an SOP solution.

• Select the AND gate as the last gate for an POS solution.

Page 71: Chapter 3

71

Bubble-to-Bubble Convention – Step 2

• Choose the active level of the output if necessary.

• Go back to the circuits inputs to the next level of gating.

Page 72: Chapter 3

72

Bubble-to-Bubble Convention – Step 3

• Match the output of these gates to the input of the final gate. This may require converting the gate to its DeMorgan’s equivalent.

• Repeat Step 2 until you reach the circuits.

Page 73: Chapter 3

73

Bubble-to-Bubble Convention – Step 3

Page 74: Chapter 3

74

Bubble-to-Bubble Convention – Step 3

Page 75: Chapter 3

75

Universality of NAND/NOR Gates

• Any logic gate can be implemented using only NAND or only NOR gates.

Page 76: Chapter 3

76

NOT from NAND

• An inverter can be constructed from a single NAND gate by connecting both inputs together.

Page 77: Chapter 3

77

NOT from NAND

Page 78: Chapter 3

78

AND from NAND

• The AND gate is created by inverting the output of the NAND gate.

BABAY

Page 79: Chapter 3

79

AND from NAND

Page 80: Chapter 3

80

OR and NOR from NAND

YXYX

YXYX

NOR

OR

Page 81: Chapter 3

81

OR and NOR from NAND

Page 82: Chapter 3

82

OR and NOR from NAND

Page 83: Chapter 3

83

NOT from NOR

• An inverter can be constructed from a single NOR gate by connecting both inputs together.

Page 84: Chapter 3

84

NOT from NOR

Page 85: Chapter 3

85

OR from NOR

• The OR gate is created by inverting the output of the NOR gate.

BABAY

Page 86: Chapter 3

86

OR from NOR

Page 87: Chapter 3

87

AND and NAND from NOR

YXYX

YXYX

NAND

AND

Page 88: Chapter 3

88

AND and NAND from NOR

Page 89: Chapter 3

89

AND and NAND from NOR

Page 90: Chapter 3

90

Practical Circuit Implementation in SSI

• Not all gates are available in TTL.• TTL components are becoming more

difficult to find.• In a circuit design, it may be necessary

to replace gates with other types of gates in order to achieve the final design.

Page 91: Chapter 3

91

Pulsed Operation• The enabling and inhibiting properties of

the basic gates are used to pass or block pulsed digital signals.

• The pulsed signal is applied to one input.• One input is used to control

(enable/inhibit) the pulsed digital signal.

Page 92: Chapter 3

92

Pulsed Operation

Page 93: Chapter 3

93

Pulsed Operation

Page 94: Chapter 3

94

General Approach to Logic Circuit Design – 1

• Have an accurate description of the problem.

• Understand the effects of all inputs on all outputs.

• Make sure all combinations have been accounted for.

Page 95: Chapter 3

95

General Approach to Logic Circuit Design – 2

• Active levels as well as the constraints on all inputs and outputs should be specified.

• Each output of the circuit should be described either verbally or with a truth table.

Page 96: Chapter 3

96

General Approach to Logic Circuit Design – 3

• Look for keywords AND, OR, NOT that can be translated into a Boolean expression.

• Use Boolean algebra or K-maps to simplify expressions or truth tables.