Digital Systems Lecture 5 Dr Ing Erwin Sitompul

  • Slides: 27
Download presentation
Digital Systems Lecture 5 Dr. -Ing. Erwin Sitompul President University http: //zitompul. wordpress. com

Digital Systems Lecture 5 Dr. -Ing. Erwin Sitompul President University http: //zitompul. wordpress. com 2 0 1 7 President University Erwin Sitompul Digital Systems 5/1

Digital Systems Section 6 Optimized Implementation of Logic Function President University Erwin Sitompul Digital

Digital Systems Section 6 Optimized Implementation of Logic Function President University Erwin Sitompul Digital Systems 5/2

Lecture Digital Systems Circuit Minimization with Karnaugh Maps n It is our intension to

Lecture Digital Systems Circuit Minimization with Karnaugh Maps n It is our intension to simplify a Boolean expression into an optimal and minimum form. n Algebraic manipulations can be used to simplify Boolean expression. We have done this before. This process is not always straightforward and easy. n Karnaugh maps (K-maps) provide an easy and visual method for finding the minimum-cost So. P (or Po. S) for a Boolean expression. n A K-map is a pictorial arrangement of the truth table which allows easy interpretation for choosing the minimum number of terms needed to algebraically express a function. n The minimization using K-map is simple. It is much faster and more time-efficient than the minimization techniques with Boolean Algebra. n K-maps works well for Boolean expressions of up to 6 input variables/ literals. President University Erwin Sitompul Digital Systems 5/3

Lecture Digital Systems Circuit Minimization with Karnaugh Maps n K-map is an approach to

Lecture Digital Systems Circuit Minimization with Karnaugh Maps n K-map is an approach to minimize Boolean Function. n The representation in the form of sum-of-product can be easily converted from the truth table. n The minimization using K-map is simple. It is much faster and more time-efficient than the minimization techniques with Boolean Algebra. President University Erwin Sitompul Digital Systems 5/4

Lecture Digital Systems Karnaugh Maps n Karnaugh map is an alternate way of representing

Lecture Digital Systems Karnaugh Maps n Karnaugh map is an alternate way of representing Boolean Function. See the graphs below. n All rows of the output column from the truth table is represented with a square in Karnaugh map. 2 -Variable Function ● Truth Table A B F 0 0 m 0 0 1 m 1 1 0 m 2 1 1 m 3 President University ● Karnaugh Map B 0 1 0 m 1 1 m 2 m 3 A Erwin Sitompul Digital Systems 5/5

Lecture Digital Systems Karnaugh Maps 3 -Variable Function • Truth Table A B C

Lecture Digital Systems Karnaugh Maps 3 -Variable Function • Truth Table A B C F 0 0 0 m 0 0 0 1 m 1 0 m 2 0 1 1 m 3 1 0 0 m 4 1 0 1 m 5 1 1 0 m 6 1 1 1 m 7 President University ● Karnaugh Map BC 00 01 11 10 0 m 1 m 3 m 2 1 m 4 m 5 A Erwin Sitompul m 7 m 6 Digital Systems 5/6

Lecture Digital Systems Karnaugh Maps 4 -Variable Function CD 00 AB 00 m 0

Lecture Digital Systems Karnaugh Maps 4 -Variable Function CD 00 AB 00 m 0 01 11 10 m 1 m 3 m 2 01 m 4 m 5 m 7 m 6 11 m 12 m 13 m 15 m 14 10 m 8 m 9 m 11 m 10 President University Erwin Sitompul Digital Systems 5/7

Lecture Digital Systems Karnaugh Maps n Every row in the output column of a

Lecture Digital Systems Karnaugh Maps n Every row in the output column of a truth table can be written in the form of minterms. n Correspondingly, every square of a Karnaugh map can be written in the form of minterms, too. n So. P can be obtained as the sum of all minterms. ● Karnaugh Map ● Truth Table A B F 0 0 1 1 1 0 0 1 1 0 B B 0 1 1 0 A’B’ A’B 1 0 0 1 AB’ AB A A 0 1 F = m 0 + m 1 = A’B’ + A’B President University Erwin Sitompul Digital Systems 5/8

Lecture Digital Systems Karnaugh Maps n K-map of 3 -variable function: ? A ●

Lecture Digital Systems Karnaugh Maps n K-map of 3 -variable function: ? A ● By writing SOP, what is F for this 3 -variable K-map? ● F(A, B, C) = Σm(1, 2, 4, 5, 6, 7) ● F = AB’C’ +AB C +ABC + A’B’C + A’BC’ ● F(A, B, C) = πM(0, 3) ● F = (A+B+C)(A+ B’+C’) n K-map of 4 -variable function: ? A ● By writing SOP, what is F for this 4 -variable K-map? ● F(A, B, C, D) = Σm(2, 3, 4, 6, 7, 8, 14, 15) ● F(A, B, C, D) = πM(0, 1, 5, 9, 10, 11, 12, 13) ● F =… President University Erwin Sitompul Digital Systems 5/9

Lecture Digital Systems K-map: Sum-of-Product Minimization n If we take a closer look to

Lecture Digital Systems K-map: Sum-of-Product Minimization n If we take a closer look to a K-map, we can see that any 2 neighboring squares are only differ by a single literal. n For example, m 1 (A’B’C) and m 5 (AB’C) m 3 (A’BC) and m 2 (A’BC’) m 4 (AB’C’) and m 6 (ABC’) n We can simplify the neighboring squares as follows: m 1 + m 5 = A’B’C + AB’C = (A’ + A)B’C = B’C m 3 + m 7 = A’BC + ABC = (A’ + A)BC = BC BC A 00 01 11 10 0 m 0 m 1 m 3 m 2 1 m 4 m 5 m 7 m 6 n Four neighboring squares are now becomes two rectangles. President University Erwin Sitompul Digital Systems 5/10

Lecture Digital Systems K-map: Sum-of-Product Minimization n Now, the 2 neighboring rectangles can be

Lecture Digital Systems K-map: Sum-of-Product Minimization n Now, the 2 neighboring rectangles can be further simplified as: m 1 + m 5 + m 3 + m 7 = B’C + BC BC = (B’ + B)C A 00 01 11 10 =C 0 m 1 m 3 m 2 1 m 4 m 5 m 7 m 6 n This is the way how we can use K-map to simplify Boolean functions. We try to cover all minters in the biggest possible squares/ rectangles, and simplify each of them. n The Boolean property that we use is: x · y + x · y’ = x (Combining, see Lecture 2) President University Erwin Sitompul Digital Systems 5/11

Lecture Digital Systems K-map: Sum-of-Product Minimization n Practically, any neighboring cells or rectangles will

Lecture Digital Systems K-map: Sum-of-Product Minimization n Practically, any neighboring cells or rectangles will have one or more common literals and exactly one different literal. n They can be grouped in squares or rectangles with the dimension of [2 n × 2 m]. BC n 2 neighboring cells in a 3 -variable function: A 00 01 11 10 AB’C + AB’C’ = AB’(C+C’) 0 m 1 m 3 m 2 = AB’ 1 m 4 m 5 m 7 m 6 n 4 neighboring cells in a 4 -variable function: A’B’CD’ + A’BCD’ + AB’CD’ + ABCD’ = A’(B’+B)CD’ + A(B’+B)CD’ CD AB 00 01 11 10 = (A’+A)(B’+B)CD’ = CD’ 00 m 1 m 3 m 2 01 m 4 m 5 m 7 m 6 11 m 12 m 13 m 15 m 14 10 m 8 m 9 m 11 m 10 President University Erwin Sitompul Digital Systems 5/12

Lecture Digital Systems Rules for Karnaugh Maps n We can simplify a Boolean expression

Lecture Digital Systems Rules for Karnaugh Maps n We can simplify a Boolean expression by encircling 1’s in the Karnaugh map by using “power-of-2 rectangle”. n This means, the dimension of the rectangle must be [2 n× 2 n] n The rectangles may contain 1, 2, 4, 8, … cells of 1’s. n Only cells of 1’s may be encircled. n All the 1’s must be enclosed in the smallest possible number of rectangles. n All the 1’s must be encircled with rectangles with the biggest possible size. n Encircling a 1 more than once is allowed. n We can then deduced a minterm for each rectangle. Rectangles with dimension greater than [1× 1] form minimized minterms. President University Erwin Sitompul Digital Systems 5/13

Lecture Digital Systems Rules for Karnaugh Maps n Encircled pair of adjacent 1 s

Lecture Digital Systems Rules for Karnaugh Maps n Encircled pair of adjacent 1 s in K-map eliminates one variable that appears in true and complemented form. n Encircled quad of adjacent 1 s eliminates two variables that appear in both true and complemented form. n Encircled octet of adjacent 1 s eliminates three variables that appear in both true and complemented form. n Variables that are the same for all encircled squares must appear in the final expression. President University Erwin Sitompul Digital Systems 5/14

Lecture Digital Systems Some Terminologies n An implicant is a rectangle that encircles 1,

Lecture Digital Systems Some Terminologies n An implicant is a rectangle that encircles 1, 2, 4, 8, … cells of 1’s and may not include any cells of 0’s. n A prime implicant is an implicant that is not fully contained in any one other implicant. n An essential prime implicant is a prime implicant that includes at least one 1 that is not included in any other implicant. ● Implicants President University ● Prime implicants, but not essential Erwin Sitompul Digital Systems 5/15

Lecture Digital Systems Simplification Using K-maps A’ F(A, B) = Σm(0, 1) F =

Lecture Digital Systems Simplification Using K-maps A’ F(A, B) = Σm(0, 1) F = A’ B’C BC’ F(A, B, C) = Σm(1, 2, 4, 5, 6, 7) F = A + B’C + BC’ A President University Erwin Sitompul Digital Systems 5/16

Lecture Digital Systems Exercise: Simplification Using K-maps A’C’ B AB F=B F = A’C’

Lecture Digital Systems Exercise: Simplification Using K-maps A’C’ B AB F=B F = A’C’ + AB BC AB AC F = AB + AC + BC President University Erwin Sitompul Digital Systems 5/17

Lecture Digital Systems Exercise: Simplification Using K-Maps B’D’ BC’D A F = C +A’BD

Lecture Digital Systems Exercise: Simplification Using K-Maps B’D’ BC’D A F = C +A’BD + B’D’ ? BC’D’ ● What is the minimized F? ABD’ AC’ F = AC’ + BC’D’ + ABD’ President University Erwin Sitompul Digital Systems 5/18

Lecture Digital Systems Exercise: Simplification Using K-Maps Simplify the following function by using K-map:

Lecture Digital Systems Exercise: Simplification Using K-Maps Simplify the following function by using K-map: F(A, B, C, D) = Σm(0, 2, 3, 5, 6, 7, 8, 10, 11, 14, 15). A● F = C + B’D’ + A’BD President University Erwin Sitompul Digital Systems 5/19

Lecture Digital Systems Summary: Karnaugh Maps n Karnaugh map is an alternate approach to

Lecture Digital Systems Summary: Karnaugh Maps n Karnaugh map is an alternate approach to represent Boolean expressions. n Karnaugh map representation can be used to minimize Boolean expressions through some easy steps/rules. n Nevertheless, not all functions can be reduced, and still have to be represented in their canonical minterms. n Note: a canonical minterm is a minterm with all possible literal present. n For example, in a 4 -variable function, AB’ can be a minterm, but its canonical minterms are AB’CD, AB’CD’, AB’C’D, and AB’C’D’. President University Erwin Sitompul Digital Systems 5/20

Lecture Digital Systems Don’t Care Conditions n In some situations, we don’t care about

Lecture Digital Systems Don’t Care Conditions n In some situations, we don’t care about the value of a function for certain combinations of the variables. n These combinations may be impossible to occur in a certain contexts or the value of the function may not matter when they occur. n In such situations mentioned above, we say the function is incompletely specified. n There are multiple (completely specified) logic functions that can be used in the design. So, we can utilize the don’t cares to create the simplest possible circuit. n When constructing the rectangles in the simplification procedure, we can choose either to cover or not to cover the don’t cares. n Don’t cares can be treated as 1’s or 0’s, depending on which is more advantageous. n It may be covered or not. It is denoted with X’s. President University Erwin Sitompul Digital Systems 5/21

Lecture Digital Systems Don’t Care Conditions n Here is an example of a Karnaugh

Lecture Digital Systems Don’t Care Conditions n Here is an example of a Karnaugh map with don’t cares (X). ● Covering 1’s without utilizing X ● Covering 1’s utilizing X n Instead of using 2 -cell implicants, we can use 4 -cell implicants, and the Boolean function can be better simplified. n Instead of F = A’BD’ + BC’D we can use F = BC’ + A’B President University Erwin Sitompul Digital Systems 5/22

Lecture Digital Systems Exercise: Don’t Care Conditions F(A, B, C, D) = πM(0, 2,

Lecture Digital Systems Exercise: Don’t Care Conditions F(A, B, C, D) = πM(0, 2, 3, 9) + d(4, 5, 7, 8, 14) F = B + AC + A’C’D F(A, B, C, D) = Σm(0, 2, 4, 5, 6, 12, 13, 15) + d(1, 7, 8, 11, 14) F = B + A’D’ President University Erwin Sitompul Digital Systems 5/23

Lecture Digital Systems Exercise: Don’t Care Conditions 5 -Variable Function YZ 00 01 11

Lecture Digital Systems Exercise: Don’t Care Conditions 5 -Variable Function YZ 00 01 11 10 WX 1 1 00 0 01 0 X 1 1 01 0 0 X 1 11 1 1 0 X 11 1 1 X X 10 1 1 0 X 1 X X V=0 V=1 F = WY’ + VY + W’XY President University Erwin Sitompul Digital Systems 5/24

Lecture Digital Systems Exercise: Don’t Care Conditions Simplify the following function by using K-map:

Lecture Digital Systems Exercise: Don’t Care Conditions Simplify the following function by using K-map: F(A, B, C, D) = Σm(1, 3, 5, 7, 9) + d(6, 12, 13). A● F = A’D + B’C’D ● F = A’D + C’D President University Erwin Sitompul (without don’t cares) (with don’t cares) Digital Systems 5/25

Lecture Digital Systems Homework 5 (1/2) 1. Two K-maps are presented below, each for

Lecture Digital Systems Homework 5 (1/2) 1. Two K-maps are presented below, each for different function. Using So. P minimization, find the minimum realizations and calculate the cost of the circuit. 2. See next slide. CD AB 00 01 11 10 00 0 1 01 0 0 11 1 0 10 1 1 0 1 AB CD 00 01 11 10 President University Erwin Sitompul 00 0 1 1 11 1 0 0 1 1 1 1 Digital Systems 5/26

Lecture Digital Systems Homework 5 (2/2) 2. For the following K-maps, find the minimum

Lecture Digital Systems Homework 5 (2/2) 2. For the following K-maps, find the minimum YZ realization using So. P minimization, by using WX 00 01 11 10 and not using don’t cares (X). Calculate 1 0 00 0 X the costs. Which one is cheaper? 01 1 0 11 1 X 1 1 10 0 0 1 1 n Please write your Class number after your Student ID. n Deadline: 1 day before class. Monday, 9 October 2017 (Class 2). Tuesday, 10 October 2017 (Class 1). President University Erwin Sitompul Digital Systems 5/27