Introduction to Microprocessors and Digital (ME262) lgebra and Spring 2
Outline. lgebra 2. 3. Karnaugh Maps () 4. Two-variable 5. 6. 7. 2
lgebra s of Simplifying equations are defined in terms of inary variables and algebra. Two-variable logic equation logic equation logic equation F(, Y) Y Y F(, Y, Z) Z YZ F(, Y, Z, W) W YZ WZ W, Y, Z, and W are binary variables defined in the set of {, } 3
lgebra s of Simplifying Y F F (,Y)? F(, Y, Z) YZ YZ YZ What is the most simplified F(, Y, Z) m2 m3 m6 m(2,3,6 ) form? 4
lgebra s of Simplifying lgebra Karnaugh Map (K-map) 5
6 Comparison between governing laws in real number algebra and algebra Law Real Number lgebra lgebra ssociative law ) ( ) ( ) ( ) ( z y z y z y z y ) ( ) ( ) ( ) ( Z Y Z Y YZ Z Y Commutative law y y y y Y Y Y Y Identity Elements. Inverse ) ( - Distributive law z y z y ) ( ) )( ( ) ( ) ( ) ( ) ( Z Y YZ Z Y Z Y Indempotence law Complement element lgebra Simplifying lgebra
lgebra lgebra Unity Theorem ( Y ) ( Y ) Y ( Y)( Y) Y bsorption Theorem ( Y ) ( Y) ( Y ) Y ( Y) Y Consensus Theorem Y Z YZ Y Z 7
lgebra lgebra Eample : Prove Unity, bsorption, and Consensus theorems. 8
lgebra lgebra Eample 2: Simplify the following equations.. CD D CD C CD 2. 9
lgebra graphical way to represent a logic equation. In order to do this, we use: - square to show the binary space 2- circle to show a binary variable 3- The area inside the circle to represent a true value and the area outside the circle to represent a false value.
lgebra For eample, the following figures show and.
lgebra Venn Diagram for 3 variables: C There was some struggle as to how to generalize too many sets. You can use as far as four sets by using ellipses: 2
lgebra Eample 3: What is the Venn Diagram of the following epression? YZ YZ YZ 3
lgebra Eample 4: What is the epression of the following Venn diagram? 4
lgebra Karnaugh Map (K-map) Karnaugh map (or K-map ) is a simple graphical method for simplifying logic equations. The method is useful for functions that contain up to four logical variables. For logic equations with more than four variables a tabular method is used. K-map was invented by Maurice Karnaugh in 953. 5
Two-variable K-map lgebra 6
Two-variable K-map lgebra z y w y y w 7
lgebra Two-variable K-map Eample 5: Mark the cell(s) associated with Z= in a two-variable K-map. Z= 8
Two-variable K-map lgebra F 2 2 3 Rules for construction of Two-variable : 3 - Circle adjacent s, horizontally or vertically but not diagonally. 2- The sum of minterms inside each circle is the common variable among the minterms 3- The logic equation is obtained by OR ing the results of step 2 and the minterms which are not included in any of the circles. 9
lgebra Eample 6: Use a K-map to simplify the following truth tables Z Two-variable K-map Z Z Z 2
K-map lgebra C C C C C C 2
lgebra C F 2 3 4 5 6 7 K-map C C C C C y C C 3 C 2 4 5 7 6 y C C 22
lgebra Eample 7: Simplify the following equation using K-map F K-map ( 6, Y, Z) m2 m3 m m(2,3,6 ) YZ Z Z Z YZ YZ YZ Y YZ Y YZ Y F(, Y, Z) Y YZ 23
lgebra K-map Rules for construction of : - Circle as many adjacent s as possible in groups of (2,4,8), horizontally or vertically but not diagonally. 2- The sum of minterms inside each circle is the common variable among the minterms 3- The logic equation is obtained by OR ing the results of step 2 and the minterms which are not included in any of the circles. 24
lgebra K-map Hints: s in the same row in the first and last columns are adjacent. For eample, consider the following K-map YZ Z Z Z Y Y F(, Y, Z) Z 25
K-map lgebra C D F 2 3 4 5 6 7 8 9 CD D D D 3 2 4 5 7 6 2 3 5 4 8 9 2 3 C C 4 5 26
lgebra K-map Rules for construction of : - Circle as many adjacent s as possible in groups of (2,4,8,6), horizontally or vertically but not diagonally. 2- The sum of minterms inside each circle is the common variable among the minterms 3- The logic equation is obtained by OR ing the results of step 2 and the minterms which are not included in any of the circles. 27
lgebra Hints: s in in the top and bottom row in the same column are adjacent, as leftmost and rightmost columns. For eample, consider the following K-map W YZ YZ Z Z Z W W W WYZ F( W, K-map Y, Y, Z) Y WZ Z WYZ WYZ WYZ WYZ WZ WYZ WYZ 28
lgebra Eample: K-map WZ YZ Z Z Z W W W Y Y F( W, W Z, Y, Z) WZ WZ Z 29
lgebra K-map Eample 8: (p3.) Simplify the following logic equations by K- maps: F( W,, Y, Z) m(,3,5,7,8,9,,2,3) m(,,2,3,5,7,8,5) WYZ m(,,4,5,7,,,5) m(,,2,3,4,5,6,7,8,9,,,2,3,4,5) 3
lgebra (Quine-McCluskey ) In order to apply tabular method, the function must be given as a sum of minterms. Consider the following two minterms, which differ in eactly one variable. They can be combined as CD CD C - the dash indicates a missing variable Now, consider the two following minterms: CD CD will not combine will not combine This concept can be epanded to sum of minterms by sorting the minterms into groups according to the number of s in each term. For eample: 3
Group Group Group 2 Group 3 F( W,, Y, Z) m(,,2,5,6,7,8,9,,4) Column Column 2 Column 3 2 8 5 6 9 7 4, -,,8,9 --,2 -,2,8, --,8 -,8,,9 --,5 -,9 -,8,2, -- 2,6-2,6,,4 -- 2, - 2,,6,4 -- 8,9-8, - 5,7-6,7-6,4 -,4-32
F( W,, Y, Z) WYZ WZ WY Y Z YZ Note that this equation has 6 implicants. We can use the following table to simplify the equation further. Implicant Covered Minterms -,5-5,7-6,7 --,,8,9 --,2,8, -- 2,6,,4 Minterms 2 5 6 7 8 9 4 Three implicants can be ignored since the minterms used in them are also used in other implicants. This can be proven using Consensus theorem, which eliminates the redundant terms. F( W,, Y, Z) WZ Y YZ 33
lgebra Eample 9: (P3.3) For the following function, find all the essential implicants using the tabular method: F( W,, Y, Z) m(,4,5,9,,3) WYZ Study: Eamples of Chapter 3 of the course package Solve: P3.,3.4, 3.5, 3.9, 3., 3.5 34