Lecture 4 Minterm and Maxterm

Slides:



Advertisements
Similar presentations
ECE 301 – Digital Electronics Minterm and Maxterm Expansions and Incompletely Specified Functions (Lecture #6) The slides included herein were taken from.
Advertisements

ECE 331 – Digital System Design
1 CS 20 Lecture 14 Karnaugh Maps Professor CK Cheng CSE Dept. UC San Diego.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
CK Cheng Tuesday 10/2/02 CS 140 Lecture 2. Part I. Combinational Logic I) Specification –a. Language –b. Truth Table –c. Boolean Algebra –d. Incompletely.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
Lecture 1: Introduction to Digital Logic Design CK Cheng Tuesday 4/1/02.
Canonical Forms and Logic Miniminization
ECE 331 – Digital System Design Karnaugh Maps and Determining a Minimal Cover (Lecture #7) The slides included herein were taken from the materials accompanying.
CS 105 Digital Logic Design
Chapter 2: Boolean Algebra and Logic Functions
Lecture 4 Logic gates and truth tables Implementing logic functions
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
4.1 Conversion of English Sentences to Boolean Equations
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
طراحی مدارهای منطقی نیمسال دوم دانشگاه آزاد اسلامی واحد پرند.
Combinational Design ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
©2004 Brooks/Cole FIGURES FOR CHAPTER 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use the.
Switching functions The postulates and sets of Boolean logic are presented in generic terms without the elements of K being specified In EE we need to.
ECE 331 – Digital System Design
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
1 Minterm and Maxterm Expressions Definition: a minterm of n variables is a product of the variables in which each appears exactly once in true or complemented.
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
Chap 2. Combinational Logic Circuits
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
BR 2/1/991 Truth Tables (again) Recall that a boolean equation can be represented by a Truth Table A B C F
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. De Morgan’s Theorem De Morgan’s Theorem.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
CEC 220 Digital Circuit Design Minterms and Maxterms Monday, January 26 CEC 220 Digital Circuit Design Slide 1 of 11.
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 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use.
UNIT 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
CHAPTER 6 Quine-McCluskey Method
Lecture 6 Quine-McCluskey Method
Lecture 3: Incompletely Specified Functions and K Maps
Prof. Sin-Min Lee Department of Computer Science
Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture
De Morgan’s Theorem,.
Prof. Hsien-Hsin Sean Lee
Chapter 2: Boolean Algebra and Logic Functions
Computer Organisation
Complement of a Function
Lecture 2 Supplement Verilog-01
Lecture 9 Logistics Last lecture Today HW3 due Wednesday
Boolean Algebra – Part 1 ECEn 224.
Boolean Expressions Lecture No. 10.
Computer Architecture CST 250
Karnaugh Maps.
ECE 331 – Digital System Design
CSE 311 Foundations of Computing I
Boolean Algebra.
Lecture 3: Incompletely Specified Functions and K Maps
ECE 331 – Digital System Design
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
CSE 370 – Winter Combinational Logic - 1
Combinatorial Logic Circuit
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
CSE 311 Foundations of Computing I
COMS 361 Computer Organization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Supplement on Verilog adder examples
Lecture 3: Incompletely Specified Functions and K Maps
ECE 331 – Digital System Design
Presentation transcript:

Lecture 4 Minterm and Maxterm Conversion of English sentences to Boolean equations. Example The alarm will ring iff the alarm switch is on and the door is not closed or it is after 6 PM and the window is not closed. Boolean equation Z = AB’ + CD’ If Z = 1 , the alarm will ring. Draw the network. Z will drive the alarm. Chap 4

Combinational Network Specified in a Truth Table Problem statement Input 3 bits A, B, C = Binary number N. Output f. Output f = 1 if N >= 011 and f = 0 if N < 011. A B C f 000 001 010 011 100 101 110 111 1 Chap 4

Derive Algebraic Expression from Truth Table Using f = 1gives the SOP form. f = A’BC +AB’C’ + AB’C + ABC’ + ABC = A’BC + AB’ +AB = A’BC + A = A + BC. Using f = 0 gives the POS form. Maxterms are multiplied together so that if any one of them is 0, f will be 0. See what happens if using OR. f = (A+B+C)(A+B+C’)(A+B’+C) = (A+B)(A+B’+C) = A+BC Chap 4

Minterm and Maxterm Minterm A minterm of n variables = product of n literals in which each variable appears exactly once either in T or F form, but not in both. (Also known as a standard product term) Each minterm has value 1 for exactly one combination of values of variables. E.g. ABC, 111 => m7 A function can be written as a sum of minterms, which is referred to as a minterm expansion or a standard sum of products. Chap 4

Minterm/Maxterm Three variables Chap 4

Minterm Notation f = A’BC + AB’C’ + AB’C + ABC’ +ABC; The other way to represent f is: f (A,B,C) = m3 + m4 + m5 + m6 + m7 or f (A,B,C) = m(3,4,5,6,7) Another view, f (A,B,C) =0.m0+ 0.m1 +0.m2+ 1. m3 +1. m4 +1. m5 +1. m6 +1. m7 Minterms present in f correspond with the 1’s of f in the truth table. Chap 4

Maxterm Maxterm A maxterm of n variables = sum of n literals in which each variable appears exactly once in T or F from, but not in both. Each maxterm has a value of 0 for exactly one combination of values of variables. E. g. A + B + C’, 001 => M1 (the value is 0). Therefore Mi = m’i. A function can be written as a product of maxterms, which is referred to as a maxterm expansion or a standard product of sums. Chap 4

Maxterm Notation f = (A+B+C)(A+B+C’)(A+B’+C) f (A,B,C) = M0M1M2 or Maxterms present in f correspond with the 0’s of f in the truth table. Chap 4

M and m Relationship If the minterm expansion for f (A,B,C) = m3 + m4 + m5 + m6 + m7 , what is the maxterm expansion for f(A,B,C)? Choose those not present in the minterms. So the Maxterm expansion for f(A,B,C) = M0M1M2. Chap 4

Complement of minterm Complement of a minterm is the corresponding maxterm. Example if f = f (A,B,C) = m3 + m4 + m5 + m6 + m7 f’ = (m3 + m4 + m5 + m6 + m7)’ = m’3 m’4 m’5 m’6 m’7 = M3 M4 M5M6M7 Chap 4

Find the Minterm Expansion f(a,b,c,d) = a’(b’+d) + acd’. = a’b’ +a’d + acd’ = a’b’(c+c’)(d+d’) + a’d(b+b’)(c+c’) + acd’(b+b’) = a’b’c’d’ + a’b’c’d + a’b’cd’ +a’b’cd + a’bc’d + a’bcd + abcd’ +ab’cd’ = Σm(0,1,2,3,5,7,10,14) What is the maxterm expansion for f? Chap 4

Find the Maxterm Expansion f(a,b,c,d) = a’(b’+d) + acd’. = (a’+cd’)(a +b’+d); Use (x+y)(x’+z)=xz +x’y. = (a’+c)(a’+d’)(a+b’+d); Use (x+y)(x+z) = x+yz. = (a’+bb’+c+dd’)(a’+bb’+cc’+d’)(a+b’+cc’+d) = (a’+bb’+c+d)(a’+bb’+c+d’)(a’+bb’+c+d’)(a’+bb’+c’+d’)(a+b’+cc’+d) = (a’+b+c+d)(a’+b’+c+d)(a’+b+c+d’)(a’+b’+c+d’)(a’+b+c’+d’)(a’+b’+c’+d’)(a+b’+c+d)(a+b’+c’+d) =ΠM(4,6,8,9,11,12,13,15); primed = 1, unprimed = 0. Note that maxterm = 0. Chap 4

General Expressions n variables (i = 0 to 2n-1values) Minterm : F =Σaimi If ai = 1, then minterm mi exists. Maxterm : F =Π(ai+Mi); If ai = 1, then the maxterm does not exist. Note that Σaimi = Π(ai+Mi) F’ = [Π(ai+Mi)]’= Σai’Mi’ = Σai’mi = Π(ai’+Mi) Chap 4

Incompletely Specified Functions Don’t care terms. A’B’C and ABC’ are “don’t care” term. We don’t care the value of these terms,whether it is 1 or 0. Example F= A’B’C’+A’BC +ABC = A’B’C’ + BC (assign 0 to both X’s) F = A’B’C’+A’B’C+A’BC+ABC = A’B’+BC (assign 1 to first X and 0 to the second) F = A’B’+BC+AB (assign 1 to both X’s). Chap 4

Minterm Expansion for Don’t Care Example Minterm F = Σm(0,3,7) + Σd(1,6) Maxterm F = ΠM(2,4,5) . ΠD(1,6) Chap 4

Don’t Care What if A B C f x x 0 1 f = c’ f = 000 010 100 110 Chap 4

Examples 1’s complement adder Chap 4

Full Adder One bit Chap 4

2’s Complement Adder Form 2’s complement for minus operand for subtraction Chap 4

Full Adder Using Gates module fulladd (Cin, x, y, s, Cout); input Cin, x, y; output s, Cout; xor (s, x, y, Cin); and (a, x, y); and (b, x, Cin); and (c, y, Cin); or (Cout, a, b, c); endmodule   module fulladd (Cin, x, y, s, Cout); input Cin, x, y; output s, Cout; xor (s, x, y, Cin); and (a, x, y), (b, x, Cin), //omit and (c, y, Cin); or (Cout, a, b, c); endmodule  

Full Adder Using Functional Expression module fulladd (Cin, x, y, s, Cout); input Cin, x, y; output s, Cout; assign s = x ^ y ^ Cin, Cout = (x & y) | (x & Cin) | (y & Cin); endmodule  

3-bit Ripple Adders module adder3 (c0, x2, x1, x0, y2, y1, y0, s2, s1, s0, carryout); input c0, x2, x1, x0, y2, y1, y0; output s2, s1, s0, carryout; fulladd b0 (c0, x0, y0, s0, c1); fulladd b1 (c1, x1, y1, s1, c2); fulladd b2 (c2, x2, y2, s2, carryout); endmodule   module fulladd (Cin, x, y, s, Cout); input Cin, x, y; output s, Cout; assign s = x ^ y ^ Cin, assign Cout = (x & y) | (x & Cin) | (y & Cin); endmodule  Instantiate the fulladd module

3-bit Ripple Adders Using Vectored Signals module adder3 (c0, x2, x1, x0, y2, y1, y0, s2, s1, s0, carryout); input c0, x2, x1, x0, y2, y1, y0; output s2, s1, s0, carryout; fulladd b0 (c0, x0, y0, s0, c1); fulladd b1 (c1, x1, y1, s1, c2); fulladd b2 (c2, x2, y2, s2, carryout); endmodule   module fulladd (Cin, x, y, s, Cout); input Cin, x, y; output s, Cout; assign s = x ^ y ^ Cin, assign Cout = (x & y) | (x & Cin) | (y & Cin); endmodule  Vectored signals used module adder3 (c0, X, Y, S, carryout); input c0; input [2:0] X, Y; output [2:0] S; output carryout; wire [2:1] C; fulladd b0 (c0, X[0], Y[0], S[0], C[1]); fulladd b1 (C[1], X[1], Y[1], S[1], C[2]); fulladd b2 (C[2], X[2], Y[2], S[2], carryout); endmodule 

Overflow and Carry-Out detection For unsigned number carry out from n-1 bit position: If both xn-1 and yn-1 are 1 or If either xn-1 or yn-1 is 1 and sn-1 is 0. Hence, carryout = xn-1 yn-1 + ~sn-1 xn-1 + ~sn-1 yn-1 n-bit signed number: -2n-1 to 2n-1 -1 Detect overflow for signed number: Overflow = Cn-1 ⊕ Cn Overflow = Xn-1 Yn-1 ~Sn-1 (110) + ~Xn-1 ~Yn-1 Sn-1 (001) (summation of two same signs produce different sign) where X and Y represent the 2’s complement numbers, S = X+Y. (sign bits 0, 0 ≠ 1 ) 0111 1111