UNIT 4 MINTERM AND MAXTERM EXPANSIONS

Similar documents
This form sometimes used in logic circuit, example:

UNIT 5 KARNAUGH MAPS Spring 2011

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

DIGITAL ELECTRONICS & it0203 Semester 3

CHAPTER III BOOLEAN ALGEBRA

CHAPTER 5 KARNAUGH MAPS

Karnaugh Map & Boolean Expression Simplification

Unit 2 Session - 6 Combinational Logic Circuits

CHAPTER III BOOLEAN ALGEBRA

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

211: Computer Architecture Summer 2016

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

Review for Test 1 : Ch1 5

Advanced Digital Design with the Verilog HDL, Second Edition Michael D. Ciletti Prentice Hall, Pearson Education, 2011

Digital Logic Design. Combinational Logic

Optimizations and Tradeoffs. Combinational Logic Optimization

Systems I: Computer Organization and Architecture

MC9211 Computer Organization

Chapter 2 Combinational Logic Circuits

Combinational Logic. Review of Combinational Logic 1

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

Cs302 Quiz for MID TERM Exam Solved

Karnaugh Maps Objectives

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Chapter 7 Logic Circuits

ELC224C. Karnaugh Maps

CHAPTER1: Digital Logic Circuits Combination Circuits

Combinatorial Logic Design Principles

Chap 2. Combinational Logic Circuits

Lecture 2 Review on Digital Logic (Part 1)

Why digital? Overview. Number Systems. Binary to Decimal conversion

Minimization techniques

Chapter 2 Combinational Logic Circuits

Boolean Algebra and Logic Design (Class 2.2 1/24/2013) CSE 2441 Introduction to Digital Logic Spring 2013 Instructor Bill Carroll, Professor of CSE

EEE130 Digital Electronics I Lecture #4

Signals and Systems Digital Logic System

Gate-Level Minimization

Number System conversions

Administrative Notes. Chapter 2 <9>

Combinational Logic. By : Ali Mustafa

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

COMBINATIONAL LOGIC FUNCTIONS

for Digital Systems Simplification of logic functions Tajana Simunic Rosing Sources: TSR, Katz, Boriello & Vahid

Logic Simplification. Boolean Simplification Example. Applying Boolean Identities F = A B C + A B C + A BC + ABC. Karnaugh Maps 2/10/2009 COMP370 1

Simplifying Logic Circuits with Karnaugh Maps

Boolean Algebra and Logic Simplification

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.

Part 1: Digital Logic and Gates. Analog vs. Digital waveforms. The digital advantage. In real life...

CHAPTER 3 BOOLEAN ALGEBRA

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

Midterm1 Review. Jan 24 Armita

Chapter 2 Boolean Algebra and Logic Gates

CHAPTER 7. Exercises 17/ / /2 2 0

Chapter 2 Combinational Logic Circuits

Chapter 4 Optimized Implementation of Logic Functions

1 Boolean Algebra Simplification

Standard Expression Forms

Lecture 7: Karnaugh Map, Don t Cares

WEEK 3.1 MORE ON KARNAUGH MAPS

Unit 2 Boolean Algebra

14:332:231 DIGITAL LOGIC DESIGN. Combinational Circuit Synthesis

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Computer Organization I. Lecture 13: Design of Combinational Logic Circuits

Chapter 4: Combinational Logic Solutions to Problems: [1, 5, 9, 12, 19, 23, 30, 33]

Z = F(X) Combinational circuit. A combinational circuit can be specified either by a truth table. Truth Table

Digital Circuit And Logic Design I. Lecture 4

Chapter-2 BOOLEAN ALGEBRA

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

CPE100: Digital Logic Design I

Fundamentals of Boolean Algebra

EC-121 Digital Logic Design

Unit 2 Boolean Algebra

Carry Look Ahead Adders

ELCT201: DIGITAL LOGIC DESIGN

Boolean Algebra & Logic Gates. By : Ali Mustafa

Combinational Logic Fundamentals

Combinational Logic Circuits Part II -Theoretical Foundations

ENG2410 Digital Design Combinational Logic Circuits

The Karnaugh Map COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Logic Design. Chapter 2: Introduction to Logic Circuits

Karnaugh Maps ف ر آ ا د : ا ا ب ا م آ ه ا ن ر ا

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Introduction to Karnaugh Maps

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

Unit 3 Session - 9 Data-Processing Circuits

Combina-onal Logic Chapter 4. Topics. Combina-on Circuit 10/13/10. EECE 256 Dr. Sidney Fels Steven Oldridge

Combinational Logic Design/Circuits

Logic Design I (17.341) Fall Lecture Outline

MODULAR CIRCUITS CHAPTER 7

Digital Logic Design. Malik Najmus Siraj

CSE 140, Lecture 2 Combinational Logic CK Cheng CSE Dept. UC San Diego

2 Application of Boolean Algebra Theorems (15 Points - graded for completion only)

Chapter 2 : Boolean Algebra and Logic Gates

UNIT 3 BOOLEAN ALGEBRA (CONT D)

Chapter 2: Switching Algebra and Logic Circuits

Transcription:

UNIT 4 MINTERM AND MAXTERM EXPANSIONS Spring 2

Minterm and Maxterm Expansions 2 Contents Conversion of English sentences to Boolean equations Combinational logic design using a truth table Minterm and maxterm expansions Incompletely specified functions Examples of truth table construction Design of binary adders Reading Unit 4 Words Translation IC

Objectives 3 Design a combinational logic circuit starting with a word description of the desired circuit behavior Steps:. Translate the word description into a switching function Boolean expression or truth table 2. Simplify the function 3. Realize it using available logic gates e.g., Mary watches TV if it is Monday night and she has finished her homework Translate Mary watches TV (F) if It is Monday night (A) And A She has finished her homework (B) F = A B B F=A B

Example: Designing an Alarm 4 The alarm will ring iff the alarm switch is turned on and the door is not closed, or it is after 6 P.M. and the window is not closed Translate The alarm will ring (Z) iff The alarm switch is on (A) and the door is NOT closed (B') Or It is after 6 P.M. (C) and the window is NOT closed (D') Z = A B' + C D' A B Z C D

5 Logic Design using a Truth Table A truth table helps translation

Threshold Detector (/2) 6 Design a detector that outputs when input is greater than 2 Inputs (A, B, C) 2 represent a binary number N; if N = (A, B, C) 2 3 = 2, output f = ; otherwise f = 2 3 4 5 6 7 A B C f f A B C N > 2? Show the condition to make output == f 3 4 5 6 7 B f = A'BC + AB'C' + AB'C + ABC' + ABC (SOP) = A'BC + ABC + AB'C' + AB'C + ABC' + ABC C = A + BC (Simplified using Boolean Algebra, Units 2&3) A f

Threshold Detector (2/2) 7 Counting s, we have SOP What if counting s? 2 3 4 5 6 7 A B C f f 2 f' = A'B'C' + A'B'C + A'BC' Taking the complement by DeMorgan s law, f = (A'B'C' + A'B'C + A'BC')' = [(A' B' C')+(A' B' C)+(A' B C')]' = (A + B + C)(A + B + C')(A + B' + C) (POS) A B C N > 2? Show the condition to make output == f

Summary: Logic Design using a Truth Table 8 General steps:. Make a truth table according to the word description 2. Generate a Boolean expression SOP: check s POS: check s First of all, have f' in SOP, then derive f in POS 3. Simplify the Boolean expression Words Translation IC

9 Minterm & Maxterm Expansions

Minterm vs. Maxterm Definition: A minterm/maxterm of n variables is a product/sum of n literals in which each variable appears exactly once in either true or complement form (but not both) A literal is a variable or its complement, e.g., A, A' e.g., assume 3 variables Minterm: A'BC, AB'C' Maxterm: A+B+C, A+B+C' (m i )' = M i DeMorgan Each minterm corresponding one input condition Row No. ABC Minterms m i Maxterms M i m = A B C M = A + B + C m = A B C M = A + B + C 2 m 2 = A B C M 2 = A + B + C 3 m 3 = A B C M 3 = A + B + C 4 m 4 = A B C M 4 = A + B + C 5 m 5 = A B C M 5 = A + B + C 6 m 6 = A B C M 6 = A + B + C 7 m 7 = A B C M 7 = A + B + C

Minterm Expansion A minterm expansion or a standard sum of products: a function is written as a sum of minterms i.e., counting s e.g., f = A'BC + AB'C' + AB'C + ABC' + ABC = m 3 + m 4 + m 5 + m 6 + m 7 (m-notation) = Σ m(3, 4, 5, 6, 7) A B C N > 2? f Row No. ABC Minterms m i Maxterms M i m = A B C M = A + B + C m = A B C M = A + B + C 2 m 2 = A B C M 2 = A + B + C 3 m 3 = A B C M 3 = A + B + C 4 m 4 = A B C M 4 = A + B + C 5 m 5 = A B C M 5 = A + B + C 6 m 6 = A B C M 6 = A + B + C 7 m 7 = A B C M 7 = A + B + C

Maxterm Expansion 2 A maxterm expansion or a standard product of sums: a function is written as a product of of maxterms i.e., counting s e.g., f' = A'B'C' + A'B'C + A'BC' f = (A + B + C)(A + B + C')(A + B' + C) = M M M 2 (M-notation) = Π M(,, 2) A B C N > 2? f Row No. ABC Minterms m i Maxterms M i m = A B C M = A + B + C m = A B C M = A + B + C 2 m 2 = A B C M 2 = A + B + C 3 m 3 = A B C M 3 = A + B + C 4 m 4 = A B C M 4 = A + B + C 5 m 5 = A B C M 5 = A + B + C 6 m 6 = A B C M 6 = A + B + C 7 m 7 = A B C M 7 = A + B + C

Complement using Minterms/Maxterms 3 (m i )' = M i Complement of f:. Count s in f (find f' directly) f' = m + m + m 2 = Σ m(,, 2) f' = M 3 M 4 M 5 M 6 M 7 = Π M(3, 4, 5, 6, 7) 2. Count s in f (find f and then complement it) f' = (f)' = (m 3 + m 4 + m 5 + m 6 + m 7 )' = m 3 'm 4 'm 5 'm 6 'm 7 ' = M 3 M 4 M 5 M 6 M 7 = Π M(3, 4, 5, 6, 7) f' = (f)' = (M M M 2 )' = M ' + M ' + M 2 ' = m + m + m 2 = Σ m(,, 2) A B C f f

Example: Minterm/Maxterm Expansion 4 e.g., f(a, b, c, d) = a'(b' + d) + acd' 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(,, 2, 3, 5, 7,, 4) (Minterm Expansion) = Π M(4, 6, 8, 9,, 2, 3, 5) (Maxterm Expansion)

Summary (/2) 5 Convert a Boolean expression to a minterm/maxterm expansion Use truth table Sometimes there are too many terms Use Boolean algebra SOP multiply out and use (X + X')= minterm expansion POS factor and use XX'= maxterm expansion

Summary (2/2) 6 Convert between a minterm and a maxterm expansion If f = Σ m i, then f = Π M j, where each m j is not in f DESIRED FORM Minterm Maxterm Minterm Maxterm Expansion of f Expansion of f Expansion of f' Expansion of f' GiVEN FORM Minterm Expansion of f Maxterm Expansion of f -------------- minterm nos. are those nos. not on the maxterm list for f maxterm nos. are those nos. not on the minterm list for f -------------- list minterms not present in f minterm nos. are the same as maxterm nos. of f maxterm nos. are the same as minterm nos. of f list maxterms not present in f There is a -to- mapping between a truth table and the minterm/maxterm expansion

AND of Two Minterm Expansions 7 e.g., Given f = Σ m(, 2, 3, 5, 9, ), f 2 = Σ m(, 3, 9,, 3, 4), find f f 2 =? AND: take the numbers that appear in both expansions: f f 2 = Σ m(, 3, 9, ) Q: What if AND for two maxterm expansions?

General Truth Table 8 Q: Given three Boolean variables A, B, C, how many different Boolean functions can you produce? A: A B C f Each a i can be assigned with either or 2 8 = 256 a a a 2 a 3 a 4 a 5 a 6 a 7

9 Incompletely Specified Functions

Incompletely Specified Functions (/2) 2 A large digital system is usually divided into subcircuits Assume N never generates ABC = / for any w, x, y, z 2 3 4 5 6 7 A B C F x x w x y z N don t care (DC) terms can be assigned with either or A B C N2 F F: Incompletely specified function A'B'C, ABC': don t care terms

Incompletely Specified Functions (2/2) 2 Impact of don t care terms on Boolean simplification: Try exhaustive combinations of DCs to find the best expression (may be stupid but works for now). Assign to both X : F = A'B'C' + A'BC + ABC = A'B'C' + BC 2. Assign to st X, and to 2 nd X : F = A'B'C' + A'B'C + A'BC + ABC = A'B' + BC 3. Assign to both X : F = A'B'C' + A'B'C + A'BC + ABC' + ABC = A'B' + BC + AB 4. 2. is the simplest solution Notation: F = Σ m(, 3, 7) + Σ d(, 6) F = Π M(2, 4, 5) Π D(, 6) don t care minterm and maxterm have the same numbers 2 3 4 5 6 7 A B C F x x

22 Truth Table Construction

Error Detector for 6-3-- Codes (/2) 23 Design an error detector for 6-3-- codes: The output F = iff inputs (A, B, C, D) represent an invalid code combination ABCD F Decimal digit 2 3 4 5 6 7 8 9 6-3-- code. Construct the truth table

Error Detector for 6-3-- Codes (2/2) 24 ABCD F 2. Simplify the function F(A, B, C, D) = Σ m(2, 6,, 3, 4, 5) = A'B'CD' + A'BCD' + AB'CD' + ABCD' + ABC'D + ABCD = A'CD' + ACD' + ABD = CD' + ABD C D' A B D 3. Realize it F

25 A B C D Example: Truth Table Construction Decimal digit 2 3 4 5 6 7 8 9 The output Z = iff the 8-4-2- BCD number (A, B, C, D) is divisible by 3 BCD % 3 ==? 8-4-2- code Z. Construct the truth table ABCD Z X X X X X X 2. Simplify the function Z(A, B, C, D) = Σ m(, 3, 6, 9) + Σ d(,, 2, 3, 4, 5) Logic minimization using Karnaugh map (Unit 5) 3. Realize it

26 Binary Adders and Subtractor Divide-and-conquer

-Bit Half Adder (HA) 27 Addition table: + + + + 2. Simplify the function. Construct the truth table carry sum C = XY S = X'Y + XY' = X Y X Y Z C S X 3. Realize it S Y C

-Bit Full Adder (FA) 28 X Y C in. Construct the truth table X Y C in C out S Full Adder X Y + C in C out S X Y C in C out Sum 3. Realize it 2. Simplify the function C out = X'YC in + XY'C in + XYC in ' + XYC in = XY + XC in + YC in S = X'Y'C in + X'YC in ' + XY'C in ' + XYC in = X Y C in S X Y X C in Y C in C out

29 Designing a 4-Bit Parallel Adder (/3) A = (A 3 A 2 A A ), B = (B 3 B 2 B B ) Carry out A 3 A 2 A A + B 3 B 2 B B C 4 S 3 S 2 S S C Carry in A + B e.g., Carries C (=) How? Use a single truth table? Too big! C 4 S 3 S 2 S 4-bit Parallel Adder S C A 3 B 3 A 2 B 2 A B A B

Designing a 4-Bit Parallel Adder (2/3) 3 Decompose the 4 bit adder into four modules Each module adds two bits and a carry use full adder Extend to negative numbers Consider one s complement (What if two s complement?). Add just as if all numbers were positive 2. End-around carry: Add the carry out back to the rightmost bit How to detect overflow? Check sign! Add(+A, +B) A+B < 2 n- +3 +4 +7 (+) + (+) (-) or (-) + (-) (+) Add(+A, -B) B > A +5-6 - Add(-A, +B) B > A -5 +6 + () Add(-A, -B) A+B 2 n- -3-4 -7 ()

Designing a 4-Bit Parallel Adder (3/3) 3 S 3 S 2 S S C 4 C 3 Full Full Full Adder Adder Adder C 2 C Full Adder C A 3 B 3 A 2 B 2 A B A B Overflow detection? A B S A 3 B 3 S 3 Overflow + + - - - + end-around carry for s complement V = A 3 'B 3 'S 3 + A 3 B 3 S 3 '

Designing a Binary Subtractor (/2) 32 Consider A B = A + (-B) in 2 s complement A B = A + (-B) = A + B* = A + B_ + Convert B to 2 s complement: inverse and then add Discard the carry from the sign bit S 4 S 3 S 2 S C 5 (Ignore last carry ) Full Adder C 4 Full Adder C 3 Full Adder C 2 Full Adder C = B 4 ' B 3 ' B 2 ' B ' A 4 B 4 A 3 B 3 A 2 B 2 A B

Designing a Binary Subtracter (2/2) 33 Or design a full subtracter X Y = D (difference), B: borrow DIY! Cell i x i - y i - b i b i+ d i d n d i d 2 d b n+ Full Subtracter Full Subtracter b n b i+ b i b 3 Full b 2 Full b = Subtracter Subtracter x n y n x i y i x 2 y 2 x y