Chapter 2 Combinational

Similar documents
Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

Chapter 2 Combinational Logic Circuits

Chapter 2 Boolean Algebra and Logic Gates

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

Chapter 2 Combinational Logic Circuits

Number System conversions

Chapter 2 Combinational Logic Circuits

Goals for Lecture. Binary Logic and Gates (MK 2.1) Binary Variables. Notation Examples. Logical Operations

CHAPTER III BOOLEAN ALGEBRA

CHAPTER III BOOLEAN ALGEBRA

CHAPTER 2 BOOLEAN ALGEBRA

Chap 2. Combinational Logic Circuits

ENG2410 Digital Design Combinational Logic Circuits

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY LECTURE 8 : WEEK 8 CSC-110-T

Computer Organization I

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

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

Boolean Algebra & Logic Gates. By : Ali Mustafa

EC-121 Digital Logic Design

University of Technology

MC9211 Computer Organization

Chapter 2 Combinational Logic Circuits

Digital Logic Design. Combinational Logic

Administrative Notes. Chapter 2 <9>

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

Digital Circuit And Logic Design I. Lecture 3

ECE 238L Boolean Algebra - Part I

Week-I. Combinational Logic & Circuits

Logic Design. Chapter 2: Introduction to Logic Circuits

CpE358/CS381. Switching Theory and Logical Design. Class 2

Lecture 4: More Boolean Algebra

Lecture 2 Review on Digital Logic (Part 1)

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

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

Combinational Logic Fundamentals

Chapter 2: Switching Algebra and Logic Circuits

Binary Logic and Gates. Our objective is to learn how to design digital circuits.

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

Combinational Logic Design Principles

Logic Gate Level. Part 2

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

Boolean Algebra and Logic Gates

Unit 2 Boolean Algebra

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Chapter 2 Combinational Logic Circuits

Chapter 2 : Boolean Algebra and Logic Gates

Unit 2 Boolean Algebra

Signals and Systems Digital Logic System

Combinational Logic. Review of Combinational Logic 1

Chapter 2: Boolean Algebra and Logic Gates

DIGITAL ELECTRONICS & it0203 Semester 3

Standard Expression Forms

This form sometimes used in logic circuit, example:

Unit 2 Session - 6 Combinational Logic Circuits

Every time has a value associated with it, not just some times. A variable can take on any value within a range

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

Combinational Logic Circuits Part II -Theoretical Foundations

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Mark Redekopp, All rights reserved. Lecture 5 Slides. Canonical Sums and Products (Minterms and Maxterms) 2-3 Variable Theorems DeMorgan s Theorem

Chapter-2 BOOLEAN ALGEBRA

Digital Logic Design. Malik Najmus Siraj

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

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

8. BOOLEAN ALGEBRAS x x

Digital Design. Digital Design

7.1. Unit 7. Minterm and Canonical Sums 2- and 3-Variable Boolean Algebra Theorems DeMorgan's Theorem Simplification using Boolean Algebra

Gate-Level Minimization

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

EEE130 Digital Electronics I Lecture #4

CHAPTER 3 BOOLEAN ALGEBRA

Binary Logic and Gates

Learning Objectives 10/7/2010. CE 411 Digital System Design. Fundamental of Logic Design. Review the basic concepts of logic circuits. Dr.

Chapter 2 Boolean Algebra and Logic Gates

Digital Logic Design ABC. Representing Logic Operations. Dr. Kenneth Wong. Determining output level from a diagram. Laws of Boolean Algebra

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

UNIT 3 BOOLEAN ALGEBRA (CONT D)

Solutions to Assignment No 5 Digital Techniques Fall 2007

Mark Redekopp, All rights reserved. Lecture 4 Slides. Boolean Algebra Logic Functions Canonical Sums/Products

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

Boolean Algebra, Gates and Circuits

Lecture 3: Boolean Algebra

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

If f = ABC + ABC + A B C then f = AB C + A BC + AB C + A BC + A B C

ELC224C. Karnaugh Maps

ELCT201: DIGITAL LOGIC DESIGN

CS 226: Digital Logic Design

Boolean Algebra. Boolean Variables, Functions. NOT operation. AND operation. AND operation (cont). OR operation

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Boolean Algebra and Logic Simplification

Chapter 3. Boolean Algebra. (continued)

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 2 Circuit Optimization

Boolean Algebra CHAPTER 15

Boolean Algebra and Logic Gates

ECE380 Digital Logic. Axioms of Boolean algebra

CHAPTER1: Digital Logic Circuits Combination Circuits

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

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

Transcription:

Computer Engineering 1 (ECE290) Chapter 2 Combinational Logic Circuits Part 1 Gate Circuits and Boolean Equations HOANG Trang Reference: 2008 Pearson Education, Inc.

Overview Part 1 Gate Circuits and Boolean Equations Binar Logic and Gates Boolean Algebra Standard Forms Part 2 Circuit Optimization Two-Level Optimization Map Manipulation Practical Optimization i (Espresso) Multi-Level Circuit Optimization Part 3 Additional Gates and Circuits Other Gate Tpes Eclusive-OR Operator and Gates High-Impedance Outputs HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 2

Binar Logic and Gates Binar variables take on one of two values.(0,1) Logical operators operate on binar values and binar variables. Basic logical operators are the logic functions AND, OR and NOT. (an function: from 3 basic function) Logic gates (electronic circuit ) implement logic functions. Boolean Algebra: a useful mathematical sstem for specifing i and transforming logic functions. We stud Boolean algebra as a foundation for designing and analzing digital sstems! HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 3

Binar Variables Recall that the two binar values have different names: True/False On/Off Yes/No 1/0 We use 1 and 0 to denote the two values. Variable identifier eamples: A, B,, z, or X 1 for now RESET, START_IT, or ADD1 later HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 4

Logical Operations The three basic logical operations are: AND OR NOT AND is denoted b a dot ( ),(^). OR is denoted b a plus (+), (v). NOT is denoted b an overbar ( )a ), single quote mark (') after, or (~) before the variable. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 5

Notation Eamples Eamples: Y A B Or Y=AB z is read Y is equal to A AND B. is read z is equal to OR. X A is read X is equal to NOT A. Note: The statement: 1 + 1 = 2 (read one plus one equals two ) 1 + 1 = 10B (2)??? Binar (this is: binar operation is not the same as 1 + 1 = 1 (read 1 or 1 equals 1 ). (logic) HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 6

Operator Definitions Operations are defined on the values "0" and "1" for each operator: AND OR NOT 0 0 = 0 0 + 0 = 0 0 1 = 0 0 + 1 = 1 1 0 = 0 1 + 0 = 1 1 1 = 1 1 + 1 = 1 0 1 1 0 HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 7

Truth Tables Truth table a tabular listing of the values of a function for all possible combinations of values on its arguments Eample: Truth tables for the basic logic operations: AND OR NOT X Y Z=X Y X Y Z=X+Y X 0 0 0 0 0 0 0 Z X 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 8

Logic Function Implementation Using Switches For IC implementation For inputs: logic 1 is switch closed logic 0 is switch open For outputs: logic 1 is light on logic 0 is light off. NOT uses a switch such that: logic 1 is switch open logic 0 is switch closed Switches in parallel => OR Switches in series => AND Normall-closed l switch => NOT C HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 9

Logic Function Implementation (Continued) Eample: Logic Using Switches A B C D Light is on (L = 1) for L(A, B, C, D) = and off (L = 0), otherwise. Useful model for rela circuits and for CMOS gate circuits, the foundation of current digital logic technolog HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 10

Logic Gates In the earliest computers, switches were opened and closed b magnetic fields produced b energizing coils in relas. The switches in turn opened and closed the current paths. Later, vacuum tubes that open and close current paths electronicall replaced relas. Toda, transistors are used as electronic switches that open and close current paths. Optional: Chapter 6 Part 1: The Design Space HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 11

Logic Gate Smbols and Behavior X Y Logic gates have special smbols: AND gate X Z 5 X Y Z 5 X 1 Y X Z 5 X Y OR gate (a) Graphic smbols And waveform behavior in time as follows: X 0 0 1 1 NOT gate or inverter Y 0 1 0 1 (AND) X Y 0 0 0 1 (OR) X1 Y 0 1 1 1 (NOT) X 1 1 0 0 (b) Timing diagram HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 12

Gate Dela In actual phsical gates, if one or more input changes causes the output t to change, the output t change does not occur instantaneousl. The dl dela bt between an input change(s) () and dthe resulting output change is the gate dela denoted b t G : Input 0 1 Output 0 1 0 t G t G t G = 03 0.3 ns 0 0.5 1 1.5 Time (ns) HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 13

Logic Diagrams and Epressions X Y Z 0 0 0 0 0 1 010 0 0 1 1 1 0 0 101 1 1 1 0 1 1 1 Truth Table F X 0 1 0 0 1 1 1 1 Y Z X Equation F X Y Z Logic Diagram Y F Z Boolean equations, truth tables and logic diagrams describe the same function!: 3 methods and same function Truth tables are unique; epressions and logic diagrams are not. This gives fleibilit in implementing functions. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 14

Boolean Algebra An algebraic structure defined on a set of at least two elements, B, together with three binar operators (denoted +, and ) that satisfies the following basic identities: 1. X + 0 = X 2. X. 1 = X 3. X + 1 = 1 4. X. 0 = 0 5. X + X = X 6. X. X = X 7. X + X = 1 8. X. X = 0 9. X = X 10. X + Y = Y + X 11. XY = YX Commutative 12. (X + Y) + Z = X + (Y + Z) 13. (XY) Z = X(YZ) Associative 14. X(Y + Z) = XY+ XZ 15. X+ YZ = (X + Y)(X + Z) Distributive 16. X+Y = X. Y 17. X. Y = X + Y DeMorgan s DeMorgans AND -> OR, OR-> AND) HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 15

Some Properties of Identities & the Algebra If the meaning is unambiguous, we leave out the smbol The identities i i above are organized into pairs. These pairs have names as follows: 1-4 Eistence of 0 and 1 5-6 Idempotence 7-8 Eistence of complement 9 Involution 10-11 Commutative Laws 12-13 Associative Laws 14-15 Distributive Laws 16-17 DeMorgan s Laws The dual of an algebraic epression is obtained b interchanging + and and interchanging 0 s and 1 s. The identities appear in dual pairs. When there is onl one identit on a line the identit is self-dual dual, ie i. e., the dual epression = the original epression. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 16

Some Properties of Identities & the Algebra (Continued) Unless it happens to be self-dual, the dual of an epression does not equal the epression itself. Eample: F = (A + C) B+0 dual F = (A C + B) 1 = A C + B Eample: G = X Y+(W+Z) + dual G = Eample: H = A B+A C+B C dual H = Are an of these functions self-dual? l? HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 17

Some Properties of Identities & the Algebra (Continued) There can be more that 2 elements in B, i. e., elements other than 1 and 0. What are some common useful Boolean algebras with more than 2 elements? 1. Algebra of Sets 2. Algebra of n-bit binar vectors If B contains onl 1 and 0, then B is called the switching algebra which is the algebra we use most often. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 18

Boolean Operator Precedence The order of evaluation in a Boolean epression is: 1. Parentheses 2. NOT 3. AND 4. OR Consequence: Parentheses appear around dor epressions Eample: F = A(B + C)(C + D) HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 19

Eample 1: Boolean Algebraic Proof A + A B = A (Absorption Theorem) Proof Steps Justification (identit or theorem) A + A B = A 1 + A B X = X 1 = A ( 1 + B) X Y + X Z = X (Y + Z)(Distributive Law) = A 1 1 + X = 1 = A X 1 = X Our primar reason for doing proofs is to learn: Careful and efficient use of the identities and theorems of Boolean algebra, and How to choose the appropriate p identit or theorem to appl to make forward progress, irrespective of the application. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 20

Eample 2: Boolean Algebraic Proofs AB + AC + BC = AB + AC (Consensus Theorem) Proof Steps Justification (identit or theorem) AB + AC + BC =AB+AC+1 BC AC + BC? = AB +AC + (A + A) BC? = HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 21

Eample 3: Boolean Algebraic Proofs ( X Y)Z XY Y(X Z) Proof Steps Justification (identit or theorem) ( X Y )Z X Y = HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 22

Useful Theorems n Minimizatio tion Simplifica Absorption tion Simplifica Consensus z z z z z z DeMorgan's Laws g HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 23

Proof of Simplification HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 24

Proof of DeMorgan s Laws HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 25

Boolean Function Evaluation F1 F2 F3 F4 z z z F1 F2 F3 F4 z 0 0 0 0 0 z z 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 26

Epression Simplification An application of Boolean algebra Simplif to contain the smallest number of literals (complemented and uncomplemented variables): A B ACD A BD AC D A BCD = AB + ABCD + A C D + A C D + A B D = AB + AB(CD) + A C (D + D) + A B D = AB + A C + A B D = B(A + AD) +AC = B (A + D) + A C 5 literals HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 27

Complementing Functions Use DeMorgan's Theorem to complement a function: 1. Interchange AND and OR operators 2. Complement each constant value and literal Eample: Complement F = F=(++z)(++z) + + + z z Eample: Complement G = (a + bc)d + e G = HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 28

Overview Canonical Forms What are Canonical Forms? Minterms and Materms Inde Representation of Minterms and Materms Sum-of-Minterm (SOM) Representations Product-of-Materm (POM) Representations Representation of fcomplements of ffunctions Conversions between Representations HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 29

Canonical Forms It is useful to specif Boolean functions in a form that: Allows comparison for equalit. Has a correspondence to the truth tables Canonical Forms in common usage: Sum of Minterms (SOM) Product of Materms (POM) HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 30

Minterms Minterms are AND terms with ever variable present in either true or complemented form. Given that each binar variable ma appear normal (e.g., ) or complemented (e.g., ), there are 2 n minterms for n variables. Eample: Two variables (X and Y)produce 2 2 = 4 combinations: (both normal) XY XY Y(X normal, Y complemented) (minterm) XY (X complemented, Y normal) XY (both complemented) Thus there are four minterms of two variables. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 31

Materms Materms are OR terms with ever variable in true or complemented form. Given that each binar variable ma appear normal (e.g., ) or complemented (e.g., ), there are 2 n materms for n variables. Eample: Two variables (X and Y) produce 2 2 = 4 combinations: X Y (both normal) X Y ( normal, complemented) X Y ( complemented, normal) (b th l t d) X Y (both complemented) HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 32

Materms and Minterms Eamples: Two variable minterms and materms. Inde Minterm Materm 0 ( + 1 + 2 + 3 + The inde above is important for describing which variables in the terms are true and which are complemented. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 33

Standard Order Minterms and materms are designated with a subscript The subscript is a number, corresponding to a binar pattern The bits in the pattern represent the complemented or normal state of each variable listed in a standard order. All variables will be present in a minterm or materm and will be listed in the same order (usuall alphabeticall) Eample: For variables a, b, c: Materms: (a + b + c), (a + b + c) Terms: (b + a + c), a c b, and (c + b + a) are NOT in standard order. Minterms: a b c, a b c, a b c Terms: (a + c), b c, and (a + b) do not contain all variables HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 34

Purpose of the Inde The inde for the minterm or materm, epressed as a binar number, is used dto determine whether the variable is shown in the true form or complemented form. For Minterms: 1 means the variable is Not Complemented and 0 means the variable is Complemented. For Materms: 0 means the variable is Not Complemented and 1 means the variable is Complemented. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 35

Inde Eample in Three Variables Eample: (for three variables) Assume the variables are called X, Y, and Z. The standard order is X, then Y, then Z. The Inde 0 (base 10) = 000 (base 2) for three variables). All three variables are complemented for minterm 0( X, Y, Z ) and no variables are complemented for Materm 0 (X,Y,Z). Minterm 0, called m 0 is XYZ. Materm 0, called M 0 is (X + Y + Z). Minterm 6? Materm 6? HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 36

Inde Eamples Four Variables Inde Binar Minterm Materm i Pattern m i M i 0 0000 abcd a b c d 1 0001 abcd? 3 0011? a b c d 5 0101 a bcd a b c d 7 0111? a b c d 10 1010 0 a bcd a b c d 13 1101 abcd? 15 1111 abcd a b c d HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 37

Minterm and Materm Relationship Review: DeMorgan's Theorem and Two-variable eample: M and m 2 2 Thus M 2 is the complement of m 2 and vice-versa. Since DeMorgan's Theorem holds for n variables, the above holds for terms of n variables giving: M m m M i i i i and i Thus M i is the complement of m i. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 38

Function Tables for Both Minterms of Materms of 2 variables 2 variables m 0 m 1 m 2 m 3 M 0 M 1 M 2 M 3 0 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 0 Each column in the materm function table is the complement of the column in the minterm function table since M i is the complement of m i. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 39

Observations In the function tables: Each minterm has one and onl one 1 present in the 2 n terms (a minimum i of f1 1s). All other entries are 0. Each materm has one and onl one 0 present in the 2 n terms All other entries are 1 (a maimum of 1s). We can implement an function b "ORing" " the minterms corresponding to "1" entries in the function table. These are called the minterms of the function. We can implement an function b "ANDing" the materms corresponding to "0" entries in the function table. These are called the materms of the function. This gives us two canonical forms: Sum of Minterms (SOM) (Sum of Product SOP) Product of Materms (POM) (Product of Sum POS) for stating an Boolean function. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 40

Minterm Function Eample Eample: Find F 1 = m 1 + m 4 + m 7 F1 = z + z + z z inde m 1 + m 4 + m 7 = F 1 0 0 0 0 0 + 0 + 0 = 0 0 0 1 1 1 + 0 + 0 = 1 0 1 0 2 0 + 0 + 0 = 0 0 1 1 3 0 + 0 + 0 = 0 100 0 4 0 + 1 + 0 = 1 1 0 1 5 0 + 0 + 0 = 0 110 1 6 0 + 0 + 0 =0 1 1 1 7 0 + 0 + 1 = 1 HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 41

Minterm Function Eample F(A, B, C, D, E) = m 2 + m 9 + m 17 + m 23 F(A, B, C, D, E) = HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 42

Materm Function Eample Eample: Implement F1 in materms: F 1 = M 0 M 2 M 3 M 5 M 6 F1 ( z) ( z) ( z) ( z) ( z) z i M 0 M 2 M 3 M 5 M 6 = F1 0 0 0 0 0 1 1 1 1 = 0 0 0 1 1 1 1 1 1 1 = 1 0 1 0 2 1 0 1 1 1 = 0 0 1 1 3 1 1 0 1 1 = 0 1 0 0 4 1 1 1 1 1 = 1 1 0 1 5 1 1 1 0 1 = 0 110 1 6 1 1 1 1 0 = 0 1 1 1 7 1 1 1 1 1 = 1 HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 43

Materm Function Eample F(A,B,C,D) M M M 3 8 11 M 14 F(A, B,C,D) = HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 44

Canonical Sum of Minterms An Boolean function can be epressed as a Sum of Minterms. For the function table, the minterms used are the terms corresponding to the 1's For epressions, epand all terms first to eplicitl list all minterms. Do this b ANDing an term missing a variable v with a term ( ). v v Eample: Implement f as a sum of minterms. First epand terms: f ( ) Then distribute terms: f Epress as sum of minterms: f = m 3 + m 2 + m 0 HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 45

Another SOM Eample Eample: F A B C There are three variables, A, B, and C which h we take to be the standard order. Epanding the terms with missing variables: Collect terms (removing all but one of duplicate terms): Epress as SOM: HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 46

Shorthand SOM Form From the previous eample, we started with: F A B C We ended up with: F = m 1 +m 4 +m 5 +m 6 +m 7 This can be denoted in the formal shorthand: F(A, B,C) m(1,4,5,6,7) Note that we eplicitl show the standard variables in order and drop the m designators. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 47

Canonical Product of Materms An Boolean Function can be epressed as a Product of Materms (POM). For the function table, the materms used are the terms corresponding to the 0's. For an epression, epand all terms first to eplicitl list all materms. Do this b first appling the second distributive law, ORing terms missing variable v with a term equal to and then appling the distributive law again. Eample: Convert to product of materms: f(,, z) Appl the distributive law: Add missing variable z: v ( )( ) 1 ( ) z z ( z) z Epress as POM: f = M 2 M 3 HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 48 v

Another POM Eample Convert to Product of Materms: f(a, B,C) A C BC A B Use + z = (+) (+z) with (A C BC), A, and z B to oge get: f (A C BC A)(A C BC B) Then use to get: f (C BC A)(AC C B) and a second time to get: f (C B A)(A C B) Rearrange to standard order, f (A B C)(A B C) to give f = M 5 M 2 HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 49

Function Complements The complement of a function epressed as a sum of minterms is constructed t db selecting the minterms missing in the sum-of-minterms canonical forms. Alternativel, the complement of a function epressed b a Sum of Minterms form is simpl the Product of Materms with the same indices. Eample: Given F(,, z) m (1,3,5,7 ) F(,, z) F(,, z) m (0,2,4,6) (1,3,5,7) M HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 50

Conversion Between Forms To convert between sum-of-minterms and product- of-materms form (or vice-versa) versa) we follow these steps: Find the function complement b swapping terms in the list with terms not in the list. Change from products to sums, or vice versa. Eample:Given F as before: Form the Complement: F(,, z) F(,, z) m(1,3,5,7) (0,2,4,6),, Then use the other form with the same indices this forms the complement again, giving the other form of the original function: F(,, z) M(0,2,4,6) HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 51 m

Standard Forms Standard Sum-of-Products (SOP) form: equations are written as an OR of AND terms Standard Product-of-Sums (POS) form: equations are written as an AND of OR terms Eamples: SOP: A B C A B C B POS: (A B) (AB C) C These mied forms are neither SOP nor POS (A B C) (A C) ABC AC(A B) HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 52

Standard Sum-of-Products (SOP) A sum of minterms form for n variables can be written down directl from a truth table. Implementation of this form is a two-level network of gates such that: The first level consists stsof n-input n AND gates, and The second level is a single OR gate (with fewer than 2 n inputs). This form often can be simplified so that the corresponding circuit it is simpler. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 53

Standard Sum-of-Products (SOP) A Simplification Eample: F (A, B,C) m(1,4,5,6,7) Writing the minterm epression: F=ABC+ABC+ABC+ABC+ABC A B C + A B C + + Simplifing: F= Simplified F contains 3 literals compared to 15 in minterm F HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 54

AND/OR Two-level Implementation of SOP Epression The two implementations for F are shown bl below it is quite apparent which h is simpler! A B C A B C A B C A B C A B C F HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 55 A B C F

SOP and POS Observations The previous eamples show that: Canonical Forms (Sum-of-minterms, minterms Product-of- of Materms), or other standard forms (SOP, POS) differ in compleit Boolean algebra can be used to manipulate equations into simpler forms. Simpler equations lead to simpler two-level implementations Questions: How can we attain a simplest epression? Is there onl one minimum cost circuit? The net part will deal with these issues. HOANG Trang, Ref: Pearson Education, Inc. Chapter 2 - Part 1 56