Chapter 2 - Part 1 - PPT - Mano & Kime - 2nd Ed

Chapter 2 - Part 1 - PPT - Mano & Kime - 2nd Ed

Gate & Circuit Design Overview Part 1 Gate Circuits and Boolean Equations Binary Logic and Gates Boolean Algebra Standard Forms Part 2 Circuit Optimization Two-Level Optimization Map Manipulation Multi-Level Circuit Optimization Part 3 Additional Gates and Circuits Other Gate Types Exclusive-OR Operator and Gates High-Impedance Outputs Binary Logic and Gates Binary variables take on one of two values. Logical operators operate on binary values and binary variables. Basic logical operators are the logic functions AND, OR and NOT.

Logic gates implement logic functions. Boolean Algebra: a useful mathematical system for specifying and transforming logic functions. We study Boolean algebra as foundation for designing and analyzing digital systems! Binary Variables Recall that the two binary values have different names: True/False On/Off Yes/No 1/0 We use 1 and 0 to denote the two values. Variable identifier examples: A, B, y, z, or X1 for now RESET, START_IT, or ADD1 later Logical Operations The three basic logical operations are: AND

OR NOT AND is denoted by a dot (). OR is denoted by a plus (+). NOT is denoted by an overbar ( ), a single quote mark (') after, or (~) before the variable. Notation Examples Examples: Y = A.B z=x+y X=A is read Y is equal to A AND B. is read z is equal to x OR y. is read X is equal to NOT A. Note: The statement: 1 + 1 = 2 (read one plus one equals two) is not the same as 1 + 1 = 1 (read 1 or 1 equals 1). Operator Definitions Operations are defined on the values "0"

and "1" for each operator: OR AND 00=0 01=0 10=0 11=1 0+0=0 0+1=1 1+0=1 1+1=1 NOT 0=1 1= 0 Truth Tables Truth table - a tabular listing of the values of a function for all possible combinations of values on its arguments Example: Truth tables for the basic logic operations: AND X

0 0 1 1 Y Z = XY 0 0 1 0 0 0 1 1 X 0 0 1 1 Y 0 1 0 1

OR Z = X+Y 0 1 1 1 NOT X 0 1 Z=X 1 0 Logic Function Implementation Using Switches 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 Normally-closed switch NOT C Logic Function Implementation (Continued) Example: Logic Using Switches B C A D Light is on (L = 1) for L(A, B, C, D) = 1 and off (L = 0), otherwise.

Useful model for relay circuits and for CMOS gate circuits, the foundation of current digital logic technology Logic Gates In the earliest computers, switches were opened and closed by magnetic fields produced by energizing coils in relays. The switches in turn opened and closed the current paths. Later, vacuum tubes that open and close current paths electronically replaced relays. Today, transistors are used as electronic switches that open and close current paths. Transistors Today's computers use circuitry made with complementary metal-oxide semiconductor (CMOS) technology. B = input (usually 1 or 0 represented by some voltage) C = voltage base E = output NAND Universal Gate NAND

NOT AND OR NOT(NOT(A AND B)) NOT(NOT(A ) AND NOT(B)) NAND Universal Gate NOR XOR Can also use NOR gates to represent other gates (do as exercise). NOT(NOT(NOT(A) AND NOT(B))) Logic Gate Symbols and Behavior Logic gates have special symbols: X

Y Z 5 X Y X Z5 X1 Y Y OR gate AND gate And waveform behavior in time as follows: (a) Graphic symbols X 0 0 1 1

Y 0 1 0 1 (AND) X Y 0 0 0 1 (OR) X+ 1 Y 0

1 1 1 (NOT) X 1 1 0 0 (b) Timing diagram X Z5 X Logic Diagrams and

Expressions Truth Table Equation XYZ F X Y Z 000 0 001 1 010 0 011 0 100

1 101 1 Y 110 1 Z 111 1 F X Y Z Logic Diagram X F Boolean equations, truth tables and logic diagrams describe the same function! Truth tables are unique; expressions and logic diagrams are not. This gives

flexibility in implementing functions. Logic Diagrams and Expressions Boolean Algebra 1. 3. 5. 7. 9. 10. 12. 14. 16. An algebraic structure defined on a set of at least two elements, B, together with three binary operators (denoted +, and ) that satisfies the following basic identities: X +0 = X X +1 =1 X+X = X X+X = 1

2. 4. 6. 8. X=X X+Y = Y+X (X + Y) + Z = X + (Y + Z) X(Y + Z) = XY + XZ X + Y = X .Y X .1 = X X 0 =0 . X .X = X X .X = 0 Existence of 0 and 1 Idempotence Existence of Complement Involution 11.

13. XY = YX (XY) Z = X(Y Z) 15. 17. X + YZ = (X + Y) (X + Z) X .Y = X + Y Commutative Associative Distributive DeMorgans Some Properties of Identities & the Algebra If the meaning is unambiguous, we leave out the symbol The dual of an algebraic expression is obtained by interchanging + and and interchanging 0s and 1s. e.g., The dual of (1, 3, 5, 7)s dual is (2, 4, 6, 8) The identities appear in dual pairs. When there is only one identity on a line the identity is self-dual, i. e., the dual expression = the original expression. e.g., #9

Truth Tables for DeMorgans Law Gate Implementation of Boolean Functions 011 010 ? Optimized to one gate? Karnaugh maps. Truth Tables for DeMorgans Law Truth Tables for DeMorgans Law Some Properties of Identities & the Algebra Unless it happens to be self-dual, the dual of an expression does not equal the expression itself. Example: F = (A + C) B + 0 dual F = (A C ) + B 1 = A C + B Example: G = X Y + (W + Z) dual G = ?

Example: H = A B + A C + B C dual H = ? Are any of these functions self-dual? 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 binary vectors If B contains only 1 and 0, then B is called the switching algebra which is the algebra we use most often. Boolean Operator Precedence The order of evaluation in a Boolean expression is: 1. Parentheses

2. NOT 3. AND 4. OR Consequence: Parentheses appear around OR expressions Example: F = A(B + C)(C + D) Example 1: Boolean Algebraic Proof A + AB = A Proof: A + AB =A 1 + A B = A ( 1 + B) =A1 =A (Absorption Theorem) Justification (identity or theorem) X=X1 X Y + X Z = X (Y + Z)(Distributive Law) 1+X=1 X1=X Our primary 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 identity or theorem to apply to make forward progress, irrespective of the application. Example 2: Boolean Algebraic Proofs XY + XZ + YZ = XY + XZ (Consensus Theorem) Proof: Justification (identity or theorem) Example 2: Boolean Algebraic Proofs XY + XZ + YZ = XY + XZ (Consensus Theorem) Proof: Justification (identity or theorem) XY + XZ + YZ (LHS) Example 2: Boolean Algebraic Proofs XY + XZ + YZ = XY + XZ (Consensus Theorem) Proof: Justification (identity or theorem) XY + XZ + YZ (LHS) = XY + XZ + (YZ .1)

Example 2: Boolean Algebraic Proofs XY + XZ + YZ = XY + XZ (Consensus Theorem) Proof: Justification (identity or theorem) XY + XZ + YZ (LHS) = XY + XZ + (YZ .1) = XY + XZ + (YZ .(X + X)) Example 2: Boolean Algebraic Proofs XY + XZ + YZ = XY + XZ (Consensus Theorem) Proof: Justification (identity or theorem) XY + XZ + YZ (LHS) = XY + XZ + (YZ .1) = XY + XZ + (YZ .(X + X)) = XY + XZ + XYZ + XYZ Example 2: Boolean Algebraic Proofs XY + XZ + YZ = XY + XZ (Consensus Theorem) Proof: Justification (identity or theorem) XY + XZ + YZ (LHS) = XY + XZ + (YZ .1)

= XY + XZ + (YZ .(X + X)) = XY + XZ + XYZ + XYZ = XY + XYZ + XZ + XYZ Example 2: Boolean Algebraic Proofs XY + XZ + YZ = XY + XZ (Consensus Theorem) Proof: Justification (identity or theorem) XY + XZ + YZ (LHS) = XY + XZ + (YZ .1) = XY + XZ + (YZ .(X + X)) = XY + XZ + XYZ + XYZ = XY + XYZ + XZ + XYZ = XY(1+Z) + XZ(1+Y) Example 2: Boolean Algebraic Proofs XY + XZ + YZ = XY + XZ (Consensus Theorem) Proof: Justification (identity or theorem) XY + XZ + YZ (LHS) = XY + XZ + (YZ .1) = XY + XZ + (YZ .(X + X)) = XY + XZ + XYZ + XYZ = XY + XYZ + XZ + XYZ

= XY(1+Z) + XZ(1+Y) = XY + XZ (RHS) Example 2: Boolean Algebraic Proofs ACD + ABD + BCD + ABC + ACD underlined term can be eliminated by consensus thm. Can we do better? ACD + ABD + BCD + ABC + ACD start over -- this time eliminate two other terms Example 2: Boolean Algebraic Proofs Now Consider: F = ABCD + BCDE + AB + BCE cannot reduce by consensus thm.

F = ABCD + BCDE + AB + BCE + ACDE add the consensus term ACDE first F = BCE + ABCD + ACDE + AB +BCDE + ACDE Then the two underlined terms become redundant by consensus thm. Useful Theorems x .y + x.y = y (x + y )(x + y ) = y Minimization x + x.y = x x.(x+y) = x Absorption x x y = x y x ( . x + y) = x . y + . + Simplification

+ + = + Consensus x .y x .z y .z x .y x .z ( x + y ) . (x + z ) . (y + z ) = (x + y ) . (x z) x+y = x. y x .y = x + y DeMorgans Law Minimization useful for Karnaugh Maps!! Boolean Function Evaluation F1 xy z x 0 0 0 0 1 1 1

1 y 0 0 1 1 0 0 1 1 z F1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 F2 0 1 0

0 1 1 1 1 F3 F4 Boolean Function Evaluation F1 xy z x 0 0 0 0 1 1 1 1 y 0 0

1 1 0 0 1 1 z F1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 F2 0 1 0 0 1 1 1 1

F3 F4 Boolean Function Evaluation F1 xy z x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1

1 z F1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 F2 0 1 0 0 1 1 1 1 F3 F4

Boolean Function Evaluation F1 xy z F2 x yz x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z F1 0 0

1 0 0 0 1 0 0 0 1 0 0 1 1 0 F2 0 1 0 0 1 1 1 1 F3 F4 Boolean Function Evaluation F1 xy z F2 x yz

x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z F1 0 0 1 0 0 0 1 0 0 0

1 0 0 1 1 0 F2 0 1 0 0 1 1 1 1 F3 F4 Boolean Function Evaluation F1 xy z F2 x yz x 0 0 0

0 1 1 1 1 y 0 0 1 1 0 0 1 1 z F1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0

F2 0 1 0 0 1 1 1 1 F3 F4 Boolean Function Evaluation F1 xy z F2 x yz x 0 0 0 0 1 1 1

1 y 0 0 1 1 0 0 1 1 z F1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 F2 0 1 0

0 1 1 1 1 F3 F4 Boolean Function Evaluation F1 xy z F2 x yz x 0 0 0 0 1 1 1 1 y 0

0 1 1 0 0 1 1 z F1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 F2 0 1 0 0 1 1 1

1 F3 F4 Boolean Function Evaluation F1 xy z F2 x yz x 0 0 0 0 1 1 1 1 y 0 0 1 1 0

0 1 1 z F1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 F2 0 1 0 0 1 1 1 1 F3

F4 Boolean Function Evaluation F1 xy z F2 x yz F3 x y z x y z x y F4 x y x z x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1

1 z F1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 F2 0 1 0 0 1 1 1 1 F3 F4

Boolean Function Evaluation F1 xy z x y z F1 F2 F2 x yz F3 x y z x y z x y 0 0 0 0 0 0 0 1 0 1 F4 x y x z 0 0 1 1 1 1 1 1 0 0 1 1 0 1 0 1

0 1 0 0 0 0 1 0 0 0 1 1 1 1 F3 1 0 0 1 1 1 0 0

F4 Overview Canonical Forms What are Canonical Forms? Minterms and Maxterms Index Representation of Minterms and Maxterms Sum-of-Minterm (SOM) Representations Product-of-Maxterm (POM) Representations Representation of Complements of Functions Conversions between Representations Canonical Forms It is useful to specify Boolean functions in a form that: Allows comparison for equality. Has a correspondence to the truth tables Canonical Forms in common usage: Sum of Minterms (SOM) Product of Maxterms (POM) Minterms Minterms are AND terms with every variable present in either true or complemented form. Given that each binary variable may appear normal (e.g., x) or complemented (e.g., x), there are 2n minterms for n variables.

Example: Two variables (X and Y)produce 2 x 2 = 4 combinations: X Y (both normal) X Y (X normal, Y complemented) X Y (X complemented, Y normal) X Y (both complemented) Thus there are four minterms of two variables. Maxterms Maxterms are OR terms with every variable in true or complemented form, or maxterm = !minterm Given that each binary variable may appear normal (e.g., x) or complemented (e.g., x), there are 2n maxterms for n variables. Example: Two variables (X and Y) produce 22 = 4 combinations: X Y X Y X Y X Y (both normal) (x normal, y complemented)

(x complemented, y normal) (both complemented) Maxterms and Minterms Examples: Two variable minterms and maxterms. Index Minterm Maxterm 0 (00) xy x+y 1 (01) xy x+y 2 (10)

xy x+y 3 (11) xy x+y The index above is important for describing which variables in the terms are true and which are complemented. Standard Order Minterms and maxterms are designated with a subscript The subscript is a number, corresponding to a binary 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 maxterm and will be listed in the same order (usually alphabetically) Example: For variables a, b, c: Maxterms: (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

Purpose of the Index The index for the minterm or maxterm, expressed as a binary number, is used to 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 Maxterms: 0 means the variable is Not Complemented and 1 means the variable is Complemented. Index Example in Three Variables Example: (for three variables) Assume the variables are called X, Y, and Z. The standard order is X, then Y, then Z. The index 0 (base 10) = 000 (base 2) for three variables). All three variables are complemented

for mintermX0, (Y , Z ) and no variables are complemented for Maxterm 0 (X,Y,Z). Minterm 0, called m0 is X Y Z. Maxterm 0, called M0 is (X + Y + Z). Minterm 6 ? Maxterm 6 ? Index Examples Four Variables Index i 0 1 3 5 7 10 13 15 Binary Minterm

Pattern mi 0000 abc d abc d 0001 ? 0011 abcd 0101 ? 0111 abcd 1010 1101 a bc d 1111 abcd Maxterm Mi a+b+c+d ? a+ b+c+d a+ b+c+d a+ b+c+d

a+ b+c+d ? a+b+c+d Minterm and Maxterm Relationship Review: DeMorgan's Theorem x y = x + and y x + y = x .y Two-variable example: = + & m = x y M 2M2 isxthe complement y 2of m2 and vice-versa. Thus Since DeMorgan's Theorem holds for n variables, the above holds for terms of n variables

giving: Thus Mi is the complement of mi. M i = mi & mi = M i Function Tables for Both Minterms of 2 variables xy 00 01 10 11 m0 1 0 0 0 Maxterms of 2 variables m1 m2 m3 0 0 0

1 0 0 0 1 0 0 0 1 x y M0 00 0 01 1 10 1 11 1 M1 1 0 1 1 M2 1 1 0 1 M3

1 1 1 0 Each column in the maxterm function table is the complement of the column in the minterm function table since Mi is the complement of mi. Observations In the function tables: Each minterm has one and only one 1 present in the 2n terms (a minimum of 1s). All other entries are 0. Each maxterm has one and only one 0 present in the 2n terms All other entries are 1 (a maximum of 1s). We can implement any function by "ORing" the minterms corresponding to "1" entries in the function table. These are called the minterms of the function. We can implement any function by "ANDing" the maxterms corresponding to "0" entries in the function table. These are called the maxterms of the function. This gives us two canonical forms: Sum of Minterms (SOM) Product of Maxterms (POM)

for stating any Boolean function. Minterm Function Example Example: Find F1 = m1 + m4 + m7 F1 = x y z + x y z + x y z x y z index m1 + m4 + m7 = F1 000 0 0 + 0 + 0 =0 001 1

1 + 0 + 0 =1 010 2 0 + 0 + 0

=0 011 3 0 + 0 + 0 =0 100 4 0 +

1 + 0 =1 101 5 0 + 0 + 0 =0 110

6 0 + 0 + 0 =0 111 7 0 + 0 +

1 =1 Maxterm Function Example Example: Implement F1 in maxterms: F1 = M0 M2 M3 M5 M6 F 1 = (x + y + z) (x + y + z)(x + y + z ) ( x + y + z )( x + y + z) xyz 000 001 010 011 100 101 110 111 i 0 1 2 3 4

5 6 7 M0 M2 M3 M5 M6 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 = F1 =0 =1 =0 =0 =1 =0 =0 =1 Canonical Sum of Minterms Any Boolean function can be expressed as a Sum

of Minterms. For the function table, the minterms used are the terms corresponding to the 1's For expressions, expand all terms first to explicitly list all minterms. Do this by ANDing any term missing a variable v with a term (v v). Example: Implement f x x y as a sum of minterms (prod terms). First expand terms: f x( y y ) x y Then distribute terms: f xy x y x y Express as sum of minterms: f = m3 + m2 + m0 Another SOM Example F=A +BC Example: There are three variables, A, B, and C which we take to be the standard order. Expanding the terms with missing variables: A B C 1 x x (where x is a dont care condition) x 0 1 1xx 100, 101, 110, 111 (4, 5, 6, 7) x01 001, 101 (1, 5)

Shorthand SOM Form Collect terms (removing all but one of duplicate terms): (1, 4, 5, 6, 7) F = m1+m4+m5+m6+m7 This can be denoted in the formal shorthand: F ( A, B, C ) m(1,4,5,6,7) Note that we explicitly show the standard variables in order and drop the m designators. Function Complements The complement of a function expressed as a sum of minterms is constructed by selecting the minterms missing in the sum-of-minterms canonical forms. F ( x , y , z ) = S m ( 1, 3 , 5 , 7 ) F ( x , y , z ) = S m( 0, 2,4,6 ) Alternatively, the complement of a function expressed by a Sum of Minterms form is simply the Product of Maxterms with the same indices. Example: Given F ( x , y , z ) = P M (1, 3,5,7 )

Conversion Between Forms To convert between sum-of-minterms and product-ofmaxterms form (or vice-versa) we follow these steps: Find the function complement by swapping terms in the list with terms not in the list. Change from products to sums, or vice versa. Example:Given F as before: F( x, y , z ) m(1, 3,5,7 ) Form the Complement: F ( x , y , z ) = Sm ( 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( x, y , z ) M( 0, 2,4,6 ) 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 Examples: SOP: ABC+ABC+B POS: (A + B) (A + B + C ) C These mixed forms are neither SOP nor POS (A B C) (A C)

A B C + A C (A + B) Standard Sum-of-Products (SOP) A sum of minterms form for n variables can be written down directly from a truth table. Implementation of this form is a two-level network of gates such that: The first level consists of n-input AND gates, and The second level is a single OR gate (with fewer than 2n inputs). This form often can be simplified so that the corresponding circuit is simpler. Standard Sum-of-Products (SOP) A Simplification Example: F( A , B, C) m(1,4,5,6,7 ) Writing the minterm expression: F = A B C + A B C + A B C + ABC + ABC Simplifying: F=A+BC Simplified F contains 3 literals compared to 15 in minterm F AND/OR Two-level Implementation of SOP

Expression The two implementations for F are shown below it is quite apparent which is simpler! A B C F SOP and POS Observations The previous examples show that: Canonical Forms (Sum-of-minterms, Product-ofMaxterms), or other standard forms (SOP, POS) differ in complexity 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 expression? Is there only one minimum cost circuit? The next part will deal with these issues.

Karnaugh Maps (K-map) A K-map is a collection of squares Each square represents a minterm The collection of squares is a graphical representation of a Boolean function Adjacent squares differ in the value of one variable Alternative algebraic expressions for the same function are derived by recognizing patterns of squares The K-map can be viewed as A reorganized version of the truth table A topologically-warped Venn diagram as used to visualize sets in algebra of sets Some Uses of K-Maps Provide a means for: Finding optimum or near optimum SOP and POS standard forms, and two-level AND/OR and OR/AND circuit implementations for functions with small numbers of variables Visualizing concepts related to manipulating Boolean expressions, and Demonstrating concepts used by computer-aided design programs to simplify large circuits

K-Map and Truth Tables The K-Map is just a different form of the truth table. Example Two variable function: We choose a,b,c and d from the set {0,1} to implement a particular function, F(x,y). Function Table K-Map Input Values (x,y) Function Value F(x,y) 00 01 10 11 a b c d

x x y a c y b d Two-variable Maps A 2-variable Karnaugh Map: Note that minterm m0 and minterm m1 are adjacent and differ in the value of the variable y Similarly, minterm m0 and minterm m2 differ in the x variable. Also, m1 and m3 differ in the x variable as well. Finally, m2 and m3 differ in the value of the variable y Two-Variable Function F(A, B)

B A 1 1 1 Two-Variable Function F(A, B) B A 1 1 1 F = AB + AB + AB = (A + A)B + AB Distributive for AND = B + AB Negation = (A + B)(B + B)

Distributive for OR = A + B K-Map Function Representation Example: F(x,y) = x y y x 0 0 x 1 1 For function F(x,y), the two adjacent cells containing 1s can be combined using the Minimization Theorem: F(x, y ) x y x y x

10 11 On a 2-variable K-Map: One square represents a minterm with two variables Two adjacent squares represent a product term with one variable. K-Map Function Representation Example: G(x,y) = x + y y y x 0 1 x 1

1 For G(x,y), two pairs of adjacent cells containing 1s can be combined using the Minimization Theorem: G ( x , y ) x y x y xy x y x y Duplicate x y Three-variable & Four-variable Maps Gray code Four-variable Maps Three Variable Maps A three-variable K-map: yz=00

yz=01 yz=11 yz=10 x=0 m0 m1 m3 m2 x=1 m4 m5 m7 m6

Where each minterm corresponds to the product terms: yz=00 yz=01 yz=11 yz=10 x=0 x y z x y z x y z x y z x=1 x y z x y z x y z x y z Note that if the binary value for an index differs in one bit position, the minterms are adjacent on the K-Map

Alternative Map Labeling Map use largely involves: Entering values into the map, and Reading off product terms from the map. Alternate labelings are useful: yz y x x x y 0 1 3 2 4

5 7 6 z z z x 0 x 1 y y 00 01 11 10 0 1 3

2 4 5 7 6 z z z Alternative Map Labeling F=x F=x y x

x 0 1 3 2 4 5 7 6 x x z z z

0 4 3 2 5 7 6 z z y 0 0 0 0

1 1 1 1 z 1 z y x x y y z

z x x 1 1 1 1 0 0 0 0 z z z

Alternative Map Labeling y y x x 0 0 1 1 0 0 1 1 1

0 0 1 1 0 0 1 1 0 0 1 1 0

z z z z y y 0 z 1 y y x x

x x z z z y y z x x 0 0 0 1

1 0 0 1 z z z Example Functions By convention, we represent the minterms of F by a "1" in the map and leave the minterms blank y Example: 00 01 11 10 F(x, y, z) m(2,3,4,5) 0 x

1 1 1 01 11 1 Example: z G(a, b, c) m(3,4,6,7) Learn the locations of the 8 indices based on the variable order shown (x, most significant and z, least significant) on the map boundaries 1

00 1 10 1 0 x y 1 1 z 1 Combining Squares By combining squares, we reduce number of literals in a product term, reducing the literal cost, thereby

reducing the other two cost criteria On a 3-variable K-Map: One square represents a minterm with three variables Two adjacent squares represent a product term with two variables Four adjacent terms represent a product term with one variable Eight adjacent terms is the function of all ones (no variables) = 1. Example: Combining Squares y 0 Example: Let F m(2,3,6,7m(2,3,6,7) x 4 1 3

5 7 1 1 2 6 1 1 z Applying the Minimization Theorem three times: F ( x, y, z ) = x y z + x y z + x y z + x y z = yz + y z =y Thus the four terms that form a 2 2 square correspond to the term "y". Three-Variable Maps Reduced literal product terms for SOP standard

forms correspond to rectangles on K-maps containing cell counts that are powers of 2. Rectangles of 2 cells represent 2 adjacent minterms and will have two variables; Rectangles of 4 cells represent 4 minterms and will have one variable. Rectangles of 1 cell has all three variables. Minterm vs. Variable Adjacent cells in a rectangle dictate the final reduced number of variable(s) in a minterm. total # vars # cells in rectangle final reduced # var 2 2 1 (e.g., F = y) (e.g., F = xy) 1 3 4 1 (e.g., F = xyz) 2 2 1 3 (e.g., F = xyz) 4 8 1 (e.g., F = wxyz) 4 2 3

1 4 2 2 (e.g., F = xy) Three Variable Maps K-Maps can be used to simplify Boolean functions by systematic methods. Terms are selected to cover the 1sin the map, e.g., to simplify F(x, y, z) m(1,2,3,5,7) y 00 01 11 10 x 0 1 1 1 1

1 1 z F(x, y, z) =z + xy Three-Variable Maps Example Shapes of 2-cell Rectangles: 0 x 00 01 11 1 1 1 y

10 1 1 1 z Read off the product terms for the rectangles shown. Answer: yz + xz + xy Three-Variable Maps Example Shapes of 2-cell Rectangles: 0 x 00 01

11 1 1 1 y 10 1 1 1 z Read off the product terms for the rectangles shown. Answer: yz + xz + xy Three-Variable Maps Example Shapes of 4-cell Rectangles:

y y x x z 0 1 3 2 4 5 7 6 z

z Read off the product terms for the rectangles shown Three-Variable Maps Break into groups of two and minimize: y y x x 1 1 z 1 1 z 1 1 z

Three-Variable Maps y y x x 1 1 z 1 1 z 1 1 z Three-Variable Maps y y

x x 1 1 z 1 1 z 1 1 z Four Variable Terms Four variable maps can have rectangles corresponding to: A single 1 = 4 variables, (i.e. Minterm) Two 1s = 3 variables, Four 1s = 2 variables Eight 1s = 1 variable, Sixteen 1s = zero variables (i.e. Constant "1")

Four-Variable Maps A single 1 = 4 variables, (i.e. Minterm) Two 1s = 3 variables, Four 1s = 2 variables Eight 1s = 1 variable F = xz Y 0 1 3 2 4

5 7 6 12 13 15 14 8 9 11 10 W Z

X Four-Variable Maps Example Shapes of Rectangles: Y 0 1 3 2 4 5 7 6 12 13

15 14 8 9 11 10 W Z F = xz X Four-Variable Maps Example Shapes of Rectangles: Y W

0 1 3 2 4 5 7 6 12 13 15 14 8

9 11 10 Z X Four-Variable Map Example f = wxyz + wxyz + wxyz + wxyz 00 01 1 1 11 Y 10

00 01 W Four 1s = 2 variables f= xy 11 X 1 1 Z Four-Variable Maps Example Four-Variable Maps Examples Four-Variable Maps X X

X X X X Four-Variable Map Simplification Break into groups of two and minimize: F(W, X, Y, Z) = m(3,4,5,7,9,13,14,15 ) Original and Simplified Circuits Logic circuit from truth table Equivalent circuit after K-Map reduction Case Study: Seven Segment Display L1 L 4 L 6

L2 L 5 L 7 L3 Case Study (cont.) L1 L 4 L 6 L2 L 5 L 7 L3 Case Study (cont.)

Implement L4: Some gate level implementation of the Boolean function for L4 Systematic Simplification A Prime Implicant is a product term (minterm) obtained by combining the maximum possible number of adjacent squares in the map into a rectangle with the number of squares a power of 2. A prime implicant is called an Essential Prime Implicant if it is the only prime implicant that covers (includes) one or more minterms. Prime Implicants and Essential Prime Implicants can be determined by inspection of a K-Map. A set of prime implicants "covers all minterms" if, for each minterm of the function, at least one prime implicant in the set of prime implicants includes the minterm. Example of Prime Implicants Find ALL Prime Implicants CD C

B D 1 1 BD A AB 1 1 1 1 1 1 1 D AD

Minterms covered by single prime implicant 1 B 1 B C Example of Prime Implicants ALL Prime Implicants CD C B D 1 1 BD A AB -

1 1 1 1 1 1 1 D AD ESSENTIAL Prime Implicants (EPI) PI that includes minterms not belonging to more than one PI C BD 1

1 1 B BD A 1 1 1 1 1 1 1 1 1

B 1 D B C minterms that do not belong to more than one PI Prime Implicants (PI) PI: 7 Essential PI: 2 Prime Implicants (PI) PI: 6 Essential PI: 2 Prime Implicants (PI) PI: 5 Essential PI: 3 Prime Implicants (PI) PI: 4 Essential PI: 4 Prime Implicants (PI)

PI: 8 Essential PI: 0 Homework Simplify: F(W, X, Y, Z) = m (0, 2,4,5,6,7, 8,10,13,15 ) Find all prime implicants of: F(A, B, C, D) m(0,2,3,8,9,10,11,12,13,14,15) G(A, B, C, D) m(0,2,3,4,7,12,13,14,15) Determine all essential prime implicants too. Hint: There are seven prime implicants! Don't Cares in K-Maps Sometimes a function table or map contains entries for which it is known: the input values for the minterm will never occur, or The output value for the minterm is not used In these cases, the output value need not be defined Instead, the output value is defined as a don't care By placing don't cares ( an x entry) in the function table or

map, the cost of the logic circuit may be lowered. Example 1: A logic function having the binary codes for the BCD digits as its inputs. Only the codes for 0 through 9 are used. The six codes, 1010 through 1111 never occur, so the output values for these codes are x to represent dont cares.

Recently Viewed Presentations

  • New Hampshire Statewide Fire Mobilization

    New Hampshire Statewide Fire Mobilization

    Verify Request via caller I.D. Determine nearest available and appropriate District Task Force/Strike Team Contact District Mutual Aid System Dispatch Center Relay all Worksheet information Confirm Local Assembly Staging Area Location Statewide Control Center Procedures Confirm Primary and Secondary Task...
  • Endocrine Potpourri Tracy Setji MD MHS July 2019

    Endocrine Potpourri Tracy Setji MD MHS July 2019

    ingestion w/ food/pills or interfering meds. change in estrogen status (pregnancy, menopause, OCPs) change in formulation (ie. Pt on generic and pharmacy gets levothyroxine from different manufacturer) change in requirement due to decreasing residual function or nonsuppressed endogenous gland function....
  • The distance that light travels in a year is 9.5 trillion km ...

    The distance that light travels in a year is 9.5 trillion km ...

    The distance that light travels in a year is 9.5 trillion km. The brightest star in the sky, Sirius, is almost 9 light years away. How long does it take light to travel from Sirius to Earth?
  • Informational Texts - PC\|MAC

    Informational Texts - PC\|MAC

    All About Informational Texts Informational Text What does it mean????? - are there any key words? - what does text mean? Informational texts are written to inform about a specific topic such as penguins or mammals.
  • Using Compelling Messages to Build Influence + Power

    Using Compelling Messages to Build Influence + Power

    Hope. Problem - What are you trying to address (problem messages are well-suited to stories and visuals - describing who is impacted) Solution - What do you and others plan to do or have done about the problem
  • IEEE PES Transformers Committee - IEEE-SA - Working Group

    IEEE PES Transformers Committee - IEEE-SA - Working Group

    The largest and most active of the 14 technical committees of IEEE/PES Scope - develop and update standards & guidelines for the design, testing, repair, installation, operation, and maintenance of transformers, reactors, and associated components that are used within the...
  • Using the Term Structure to Forecast Interest Rates

    Using the Term Structure to Forecast Interest Rates

    Using the Term Structure to Forecast Interest Rates Interest Rate Forecasts Interest rate forecasts are needed when managers of financial institutions have to set interest rates on loans that are promised to customers in the future. We also might want...
  • Early Warning System in YPS

    Early Warning System in YPS

    PPI . February 11, 2013. Establishing an Early Warning System in Yonkers Public Schools Establishing an Early Warning System in YPS. X:\Research\Early Warning System\Early Warning System in YPS_Presentation for District Meeting on 10-19-12.ppt