CMPUT 329 - Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral.

Slides:



Advertisements
Similar presentations
Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 8 – Systematic Simplification.
Advertisements

ECE 331 – Digital System Design
ENGIN112 L8: Minimization with Karnaugh Maps September 19, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 8 Minimization with Karnaugh.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering.
Gate-Level Minimization. Digital Circuits The Map Method The complexity of the digital logic gates the complexity of the algebraic expression.
Give qualifications of instructors: DAP
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.
ECE 301 – Digital Electronics Boolean Algebra and Standard Forms of Boolean Expressions (Lecture #4) The slides included herein were taken from the materials.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Introduction Gate-level minimization refers to the design task of finding an optimal gate-level implementation of Boolean functions describing a digital.
CS 151 Digital Systems Design Lecture 8 Minimization with Karnaugh Maps.
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Overview of Chapter 3 °K-maps: an alternate approach to representing Boolean functions °K-map representation can be used to minimize Boolean functions.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Department of Computer Engineering
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
ECE 331 – Digital System Design
Optimization Algorithm
Chapter 3 Gate-Level Minimization
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral.
1 Quine-McCluskey Method. 2 Motivation Karnaugh maps are very effective for the minimization of expressions with up to 5 or 6 inputs. However they are.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Karnaugh Maps ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
Chap 2. Combinational Logic Circuits. Chap Binary Logic and Gates l 디지털 회로 (Digital circuits) o hardware components that manipulate binary information.
07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
ECE 301 – Digital Electronics Basic Logic Operations, Boolean Expressions, and Boolean Algebra (Lecture #3)
Chap 2. Combinational Logic Circuits
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
CONSENSUS THEOREM Choopan Rattanapoka.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2002 Topic2: DeMorgan Laws José Nelson Amaral.
Conversion from one number base to another Binary arithmetic Equation simplification DeMorgan’s Laws Conversion to/from SOP/POS Reading equations from.
Module –I Boolean Algebra Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
1 Example: Groupings on 3-Variable K-Maps BC F(A,B,C) = A ’ B ’ A BC F(A,B,C) = B ’ A
Karnaugh Map (K-Map) By Dr. M. Khamis Mrs. Dua’a Al Sinari.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
1 CS 352 Introduction to Logic Design Lecture 4 Ahmed Ezzat Multi-level Gate Circuits and Combinational Circuit Design Ch-7 + Ch-8.
1 CS 352 Introduction to Logic Design Lecture 2 Ahmed Ezzat Boolean Algebra and Its Applications Ch-3 + Ch-4.
©2010 Cengage Learning SLIDES FOR CHAPTER 3 BOOLEAN ALGEBRA (continued) Click the mouse to move to the next page. Use the ESC key to exit this chapter.
CE1110: Digital Logic Design Gate Level Minimization Karnaugh Maps (K-Maps)
Lecture 7 Multi-Level Gate Networks
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
CHAPTER 3 Simplification of Boolean Functions
Computer Organisation
CS 352 Introduction to Logic Design
CSCE 211: Digital Logic Design
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Topic1: Boolean Algebra José Nelson Amaral
Optimized Implementation of Logic Function
CSCE 211: Digital Logic Design
Optimized Implementation of Logic Function
CSCE 211: Digital Logic Design
CSCE 211: Digital Logic Design
CSCE 211: Digital Logic Design
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
CH7 Multilevel Gate Network
Optimization Algorithm
Chapter 3 Gate-level Minimization.
CSCE 211: Digital Logic Design
Overview Part 2 – Circuit Optimization
CSCE 211: Digital Logic Design
Dept of Electronics Engineering
Computer Architecture
Presentation transcript:

CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral

CMPUT Computer Organization and Architecture II2 Reading Assignment Chapter 4: Section 4.3.4, 4.3.5, 4.3.6, 4.3.7, 4.3.8

CMPUT Computer Organization and Architecture II3 Cost of Implementing a Logic Circuit The cost of implementing a logic circuit is related to the number of gates used and with the number of inputs in each gate. A literal is a boolean variable or its complement. The cost of a boolean equation represented in a sum-of-products form is given by:

CMPUT Computer Organization and Architecture II4 Cost of Implementing a Logic Circuit

CMPUT Computer Organization and Architecture II5 Cost of a Logic Circuit Examples What is the cost of the following boolean equations? f1(w,x,y,z) = wxy’z + wxyz’ g1(XYZ) = XY + X’Z + YZ f2(w,x,y,z) = w’ + x’ + yz + y’z’ g2(XYZ) = XY + X’Z h1(a,b) = ab h2(a,b) = b’ C(f1) = 4+4+2=10 C(g1) = =9 C(f2) = =8 C(g2) = 2+2+2=6 C(h1) = = 2 C(h2) = = 0

CMPUT Computer Organization and Architecture II6 Karnaugh Maps M. Karnaugh, “The Map Method for Synthesis of Combinatorial Logic Circuits”, Transactions of the American Institute of Electrical Engineers, Communications and Electronics, Vol. 72, pp , November and A Karnaugh Map is a graphical tool to assist on the minimization of logic equations. Similar to a truth table, a Karnaugh Map specifies a value for each combination of inputs.

CMPUT Computer Organization and Architecture II7 Anatomy of Karnaugh Maps A A=0 A=1 A B A=0,B=1 A=1,B=1 A=0,B=0A=1,B=0 A B C A=1,B=0,C=0 A=1,B=1,C=0 A=0,B=1,C=0 A=0,B=0,C=0 A=0,B=0,C=1A=1,B=0,C=1 A=0,B=1,C=1A=1,B=1,C=1

CMPUT Computer Organization and Architecture II8 Anatomy of Karnaugh Maps A B C D A Karnaugh Map for four variables. B CD A ABCD

CMPUT Computer Organization and Architecture II9 Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A S = A’B’Cin + A’BCin’ + AB’Cin’ + ABCin Cout = A’BCin + A B’Cin + ABCin’ + ABCin = A’BCin + ABCin + AB’Cin + ABCin + ABCin’ + ABCin = BCin + ACin + AB = (A’ + A)BCin + (B’ + B)ACin + (Cin’ + Cin)AB = 1·BCin + 1· ACin + 1· AB How to use a Karnaugh Map instead of the Algebraic simplification?

CMPUT Computer Organization and Architecture II10 Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. A B Cin

CMPUT Computer Organization and Architecture II11 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout =

CMPUT Computer Organization and Architecture II12 Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = AB A B Cin

CMPUT Computer Organization and Architecture II13 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = AB + ACin

CMPUT Computer Organization and Architecture II14 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = AB + ACin + BCin

CMPUT Computer Organization and Architecture II15 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S =

CMPUT Computer Organization and Architecture II16 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S = A’BCin’

CMPUT Computer Organization and Architecture II17 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S = A’BCin’ + A’B’Cin

CMPUT Computer Organization and Architecture II18 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S = A’BCin’ + A’B’Cin + ABCin

CMPUT Computer Organization and Architecture II19 A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S = A’BCin’ + A’B’Cin + ABCin + AB’Cin’

CMPUT Computer Organization and Architecture II20 Prime Implicants Any single 1 or group of 1s in the Karnaugh map of a function F is an implicant of F. A product term is called a prime implicant of F if it cannot be combined with another term to eliminate a variable. B C A D Example: If a function F is represented by this Karnaugh Map. Which of the following terms are implicants of F, and which ones are prime implicants of F? (a) AC’D’ (b) BD (c) A’B’C’D’ (d) AC’ (e) B’C’D’ Implicant Not an Implicant Implicant Prime Implicant

CMPUT Computer Organization and Architecture II21 Essential Prime Implicants A product term is an essential prime implicant of F if there is a minterm that is only covered by that prime implicant. The minimal sum-of-products form of F must include all the essential prime implicants of F. Theorem: If a minterm m j of F and all its adjacent minterms are covered by a single term p i, then p i is an essential prime implicant of F.

CMPUT Computer Organization and Architecture II22 Example Express the complement f’(w,x,y,z) of the following expression as a sum of minterms f(w,x,y,z) = wx(y’z + yz’) f’(w,x,y,z) = w’ + x’ + (y’z +yz’)’ = w’ + x’ + (y’z)’(yz’)’ = w’ + x’ + (y + z’)(y’ + z) = w’ + x’ + yy’ + yz + z’y’ + z’z = w’ + x’ yz + z’y’ + 0 = w’ + x’ + yz + y’z’ In Topic 2 we used the following algebraic transformations to solve this problem. Could it be easier with Karnaugh Maps?

CMPUT Computer Organization and Architecture II23 Example Express the complement f’(w,x,y,z) of the following expression as a sum of minterms f(w,x,y,z) = wx(y’z + yz’) w y xz = wxy’z + wxyz’

CMPUT Computer Organization and Architecture II24 Example Express the complement f’(w,x,y,z) of the following expression as a sum of minterms f(w,x,y,z) = wx(y’z + yz’) w 1 y xz = wxy’z + wxyz’ 1 1

CMPUT Computer Organization and Architecture II25 Example Express the complement f’(w,x,y,z) of the following expression as a sum of minterms f(w,x,y,z) = wx(y’z + yz’) w 1 1 y xz = wxy’z + wxyz’ This is the Karnaugh Map for f(w,x,y,z). How do we build the Karnaugh Map for f’(w,x,y,z)?

CMPUT Computer Organization and Architecture II26 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w y x z Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) =

CMPUT Computer Organization and Architecture II27 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w y xz Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) = x’

CMPUT Computer Organization and Architecture II28 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w y xz Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) = x’ + w’

CMPUT Computer Organization and Architecture II29 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w y xz Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) = x’ + w’ + yz

CMPUT Computer Organization and Architecture II30 Example If we reverse the value in each position of the Karnaugh map of f(w,x,y,z), we obtain the Karnaugh map for f’(w,x,y,z). w y xz Now we can write the minimized form for f’(w,x,y,z) from its Karnaugh map. f’(w,x,y,z) = x’ + w’ + yz + y’z’

CMPUT Computer Organization and Architecture II31 Examples XY + X’Z + YZ = XY + X’Z = XY + X’Z + (X + X’)YZ = XY + X’Z + XYZ + X’YZ = XY + XYZ + X’Z + X’YZ = XY(1 + Z) + X’Z(1 + Y) = XY·1 + X’Z·1 XY + X’Z + YZ = XY + X’Z + 1·YZ = XY + X’Z In Topic 2 we used the following algebraic transformations to prove the consensus theorem. Could we use Karnaugh maps to obtain such a proof?

CMPUT Computer Organization and Architecture II32 Examples First we need to build the Karnaugh map for the expression: XY + X’Z + YZ Y X Z Now we need to write the simplified expression from the Karnaugh map. XY + X’Z

CMPUT Computer Organization and Architecture II33 Minimum Sum-of-products The minimum sum-of-products of a function F is formed by some, but not necessarily all, of the prime implicants of the function. B C A D Example: Write all the prime implicants for the function g expressed as this Karnaugh Map. AB AD’ BD AC

CMPUT Computer Organization and Architecture II34 Minimum Sum-of-products The minimum sum-of-products of a function F is formed by some, but not necessarily all, of the prime implicants of the function. B C A D Example: Now write the minimum sum-of-products of g. AB AD’ BD AC g = AC + AD’ + BD

CMPUT Computer Organization and Architecture II35 Karnaugh Maps of Product- of-sums Find the minimum sum-of-minterms form for the following function F’ = [(b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’)]’ = (b + c + d’)’ + (a + b’ + d)’ + (a’ + b + d’)’ + (a’ + b’ + c’)’ = b’c’d + a’bd’ + ab’d + abc Because F is given as a product-of-sums, it is easier to build the Karnaugh map for F’ and then complement it. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’)

CMPUT Computer Organization and Architecture II36 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a b cd

CMPUT Computer Organization and Architecture II37 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a b cd 11

CMPUT Computer Organization and Architecture II38 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a 11 b cd 1 1

CMPUT Computer Organization and Architecture II39 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a b cd 1 1

CMPUT Computer Organization and Architecture II40 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a b cd 1 1

CMPUT Computer Organization and Architecture II41 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can easily build the Karnaugh map for F’. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) a b cd F’ a b cd F

CMPUT Computer Organization and Architecture II42 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a b’d’

CMPUT Computer Organization and Architecture II43 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a b’d’ a’cb’

CMPUT Computer Organization and Architecture II44 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a b’d’ a’cb’ a’cd

CMPUT Computer Organization and Architecture II45 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a b’d’ a’cb’ a’cd a’bd

CMPUT Computer Organization and Architecture II46 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a b’d’ a’cb’ a’cd a’bd bc’d

CMPUT Computer Organization and Architecture II47 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a b’d’ a’cb’ a’cd a’bd bc’d abc’

CMPUT Computer Organization and Architecture II48 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a b’d’ a’cb’ a’cd a’bd bc’d abc’ ac’d’ Which prime implicants are essential for F?

CMPUT Computer Organization and Architecture II49 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc What is the set of prime implicants of F? F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a b’d’ a’cb’ a’cd a’bd bc’d abc’ ac’d’ Which prime implicants are essential for F? Only b’d’ is essential. Does the set of all essential prime implicants completely define F?

CMPUT Computer Organization and Architecture II50 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can write the minimized form for F. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) b cd F a F = b’d’

CMPUT Computer Organization and Architecture II51 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can write the minimized form for F. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) F = b’d’ + a’cd b cd F a

CMPUT Computer Organization and Architecture II52 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can write the minimized form for F. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) F = b’d’ + a’cd + bc’d b cd F a

CMPUT Computer Organization and Architecture II53 Karnaugh Maps of Product- of-sums F’ = b’c’d + a’bd’ + ab’d + abc Now we can write the minimized form for F. F = (b + c + d’)(a + b’ + d)(a’ + b + d’)(a’ + b’ + c’) F = b’d’ + a’cd + bc’d + ac’d’ b cd F a

CMPUT Computer Organization and Architecture II54 Incompletely Specified Functions N1N1 w z x y N2N2 A C B F Assumption: N 1 never produces the combinations ABC = 001 and ABC = 110. Question: What value should F produce for the combinations ABC = 001 and ABC = 110 ? We don’t care!!!

CMPUT Computer Organization and Architecture II55 Incompletely Specified Functions (Cont.) How can we use the fact that we don’t care about the value produced by F when ABC = 001 or ABC = 110 to simplify the circuit N 2 ? = A’C’(B’ + B) + (A’ + A)BC = A’C’·1 + 1·BC = A’C’ + BC F(A,B,C) = A’B’C’ + A’BC’ + A’BC + ABC If we assume that F(0,0,1) = 0 and F(1,1,0) = 0, we obtain the following equation 0 0

CMPUT Computer Organization and Architecture II56 Incompletely Specified Functions (Cont.) F(A,B,C) = A’B’C’ + A’B’C + A’BC’ + A’BC + ABC’ + ABC However, if we assume that F(0,0,1) = 1 and F(1,1,0) = 1, we obtain instead the equation: = A’B’ ·1 + A’B ·1 + AB ·1 = A’B’(C’ + C) + A’B(C’ + C) + AB(C’ + C) = A’B’ + A’B + AB = A’B’ + A’B + A’B + AB = A’(B’ + B) + (A’ + A)B = A’·1 + 1·B = A’ + B 1 1 Compare this with the other solution: F(A,B,C) = A’C’ + BC. Which one is cheaper to implement?

CMPUT Computer Organization and Architecture II57 Incompletely Specified Functions Don’t care values are easily used to simplify incompletely specified functions. A B C 1 1 X 11X F = A’ + B

CMPUT Computer Organization and Architecture II58 Another Example a X 1 X 11 1 X b c d F Write the minimized sum-of-product expression for F given in this Karnaugh map. F = cd

CMPUT Computer Organization and Architecture II59 Another Example a X 1 X 11 1 X b c d F Write the minimized sum-of-product expression for F given in this Karnaugh map. F = cd + b’c’d’

CMPUT Computer Organization and Architecture II60 Another Example a X 1 X 11 1 X b c d F Write the minimized sum-of-product expression for F given in this Karnaugh map. F = cd + b’c’d’ + a’bc’

CMPUT Computer Organization and Architecture II61 5-Variable Karnaugh Maps BC DE A 0 1 C B D E B C D E A F =

CMPUT Computer Organization and Architecture II62 5-Variable Karnaugh Maps BC DE A 0 1 C B D E B C DE A F = BD’

CMPUT Computer Organization and Architecture II63 5-Variable Karnaugh Maps BC DE A 0 1 C B D E B C DE A F = BD’ + CDE

CMPUT Computer Organization and Architecture II64 5-Variable Karnaugh Maps BC DE A 0 1 C B D E B C DE A F = BD’ + CDE + A’B’DE’

CMPUT Computer Organization and Architecture II65 5-Variable Karnaugh Maps BC DE A 0 1 C B D E B C DE A F = BD’ + CDE + A’B’DE’ + A’CD’E’

CMPUT Computer Organization and Architecture II66 5-Variable Karnaugh Maps BC DE A 0 1 C B D E B C DE A F = BD’ + CDE + A’B’DE’ + A’CD’E’ + A’C’D’E’

CMPUT Computer Organization and Architecture II67 6-Variable Karnaugh Map A B C DE X X X X 1 X 1 X 1X 1 1 X 1 X X X 1 11 X B D C E F

CMPUT Computer Organization and Architecture II68 6-Variable Karnaugh Map A B C DE X X X X 1 X 1 X 1X 1 1 X 1 X X X 1 11 X B D C E F g = C’E’

CMPUT Computer Organization and Architecture II69 6-Variable Karnaugh Map A B C DE X X X X 1 X 1 X 1X 1 1 X 1 X X X 1 11 X B D C E F g = C’E’ + A’CE

CMPUT Computer Organization and Architecture II70 6-Variable Karnaugh Map A B C DE X X X X 1 X 1 X 1X 1 1 X 1 X X X 1 11 X B D C E F g = C’E’ + A’CE + D’EF

CMPUT Computer Organization and Architecture II71 Example: BCD to Braille Convertion

CMPUT Computer Organization and Architecture II72 Example: BCD to Braille Convertion A X X XX XX B CD W = ?

CMPUT Computer Organization and Architecture II73 Example: BCD to Braille Convertion A X1 X X1 1 X XX B CD W = ?

CMPUT Computer Organization and Architecture II74 Example: BCD to Braille Convertion A X1 X X1 1 X XX B CD W = B + C + A’D + AD’

CMPUT Computer Organization and Architecture II75 Example: BCD to Braille Convertion A X X XX XX B CD X = ? W = B + C + A’D + AD’

CMPUT Computer Organization and Architecture II76 Example: BCD to Braille Convertion A 11 1 X X1 X1 1 X XX B CD X = ? W = B + C + A’D + AD’

CMPUT Computer Organization and Architecture II77 Example: BCD to Braille Convertion A 11 1 X X1 X1 1 X XX B CD X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’

CMPUT Computer Organization and Architecture II78 Example: BCD to Braille Convertion A X X XX XX B CD Y = ? X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’

CMPUT Computer Organization and Architecture II79 Example: BCD to Braille Convertion A 11 1 X1 X X1X XX B CD Y = ? X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’

CMPUT Computer Organization and Architecture II80 Example: BCD to Braille Convertion A 11 1 X1 X X1X XX B CD Y = A’C’D’ + AD’ + BD X = C’D’ + CD + AD + BC W = B + C + A’D + AD’

CMPUT Computer Organization and Architecture II81 Example: BCD to Braille Convertion A 1 1 X1 X1 X1 1 X XX B CD Z = AD + BC + B’D’ Y = A’C’D’ + AD’ + BD X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’

CMPUT Computer Organization and Architecture II82 Example: BCD to Braille Convertion Z = AD + BC + B’D’ Y = A’C’D’ + AD’ + BD X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’ How can we use these standard sum-of-product equations to implement a multiple-output NAND network? We use the DeMorgan Law: X= AB + CD = ((AB + CD)’)’ = ((AB)’(CD)’)’

CMPUT Computer Organization and Architecture II83 Example: BCD to Braille Convertion Z = AD + BC + B’D’ Y = A’C’D’ + AD’ + BD X = A’C’D’ + CD + AD + BC W = B + C + A’D + AD’ How do we implement this conversor in a PAL14H4?

PAL14H4 A B C D W X Y Z

A B C D W X Y Z W = B + C + A’D + AD’

PAL14H4 A B C D W X Y Z X = A’C’D’ + CD + AD + BC

PAL14H4 A B C D W X Y Z Y = A’C’D’ + AD’ + BD

PAL14H4 A B C D W X Y Z Z = AD + BC + B’D’