Kinh Tế - Quản Lý - Công Nghệ Thông Tin, it, phầm mềm, website, web, mobile app, trí tuệ nhân tạo, blockchain, AI, machine learning - Điện - Điện tử - Viễn thông Lecture 4: Four Input K-Maps CSE 140: Components and Design Techniques for Digital Systems CK Cheng Dept. of Computer Science and Engineering University of California, San Diego 1 Outlines Boolean Algebra vs. Karnaugh Maps – Algebra: variables, product terms, minterms, consensus theorem – Map: planes, rectangles, cells, adjacency Definitions: implicants, prime implicants, essential prime implicants Implementation Procedures 2 3 4-input K-map 01 11 01 11 10 00 00 10 AB CD Y 0 C D 0 0 0 1 1 0 1 1 B 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 YA 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 4 4-input K-map 01 11 1 0 0 1 0 0 1 1 01 1 1 1 1 0 0 0 1 11 10 00 00 10 AB CD Y 0 C D 0 0 0 1 1 0 1 1 B 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 YA 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 5 4-input K-map 01 11 1 0 0 1 0 0 1 1 01 1 1 1 1 0 0 0 1 11 10 00 00 10 AB CD Y Arrangement of variables Adjacency and partition Boolean Expression K-Map Variable xi and complement xi’Half planes Rx i , and Rxi’ Product term P=∏
Lecture 4: Four Input K-Maps CSE 140: Components and Design Techniques for Digital Systems CK Cheng Dept of Computer Science and Engineering University of California, San Diego 1 Outlines • Boolean Algebra vs Karnaugh Maps – Algebra: variables, product terms, minterms, consensus theorem – Map: planes, rectangles, cells, adjacency • Definitions: implicants, prime implicants, essential prime implicants • Implementation Procedures 2 4-iYnput K-map A B C D Y CD AB 00 01 11 10 0 0 0 0 1 0 0 0 1 0 00 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 01 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 11 1 0 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 10 1 1 1 0 0 1 1 1 1 0 3 4-input K-map Y A B C D Y CD AB 00 01 11 10 0 0 0 0 1 0 0 0 1 0 00 1 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 01 0 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 11 1 1 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 0 0 0 10 1 1 0 1 1 1 0 1 0 1 1 1 0 0 1 1 1 1 0 4 4-input K-map • Arrangement of variables • Adjacency and partition Y CD AB 00 01 11 10 00 1 0 0 1 01 0 1 0 1 11 1 1 0 0 10 1 1 0 1 5 Boolean Expression K-Map Variable xi and complement xi’Half planes Rxi, and Rxi’ Product term P=∏𝑖 𝑥𝑖 ∗ Intersect of Rxi* for all i in P Each minterm One element cell Two minterms are adjacent The two cells are neighbors Each minterm has n Each cell has n neighbors adjacent minterms 6 Procedure for finding the minimal function via K-maps (layman terms) 1 Convert truth table to K-map Y 2 Group adjacent ones: In doing so include CD AB 00 01 11 10 the largest number of adjacent ones (Prime Implicants) 00 1 0 0 1 3 Create new groups to cover all ones in the 01 0 1 0 1 map: create a new group only to include at least one cell (of value 1 ) that is not 11 1 1 0 0 covered by any other group 10 1 1 0 1 4 Select the groups that result in the minimal sum of products (we will formalize this because its not straightforward) 7 Reading the reduced K-map Y CD AB 00 01 11 10 00 1 0 0 1 01 0 1 0 1 11 1 1 0 0 10 1 1 0 1 Y = AC + ABD + ABC + BD 8 Definitions: implicant, prime implicant, essential prime implicant • Implicant: A product term that has non-empty intersection with on-set F and does not intersect with off-set R • Prime Implicant: An implicant that is not covered by any other implicant • Essential Prime Implicant: A prime implicant that has an element in on-set F but this element is not covered by any other prime implicants 9 Definition: Prime Implicant 1 Implicant: A product term that has non-empty intersection with on-set F and does not intersect with off-set R 2 Prime Implicant: An implicant that is not covered by any Y other implicant CD AB 00 01 11 10 Q: Is this a prime implicant? 00 1 0 0 1 A Yes 01 0 1 0 1 B No 11 1 1 0 0 10 1 1 0 1 10 Procedure for finding the minimal function via K-maps (formal terms) Y CD AB 00 01 11 10 1 Convert truth table to K-map 00 1 0 0 1 2 Include all essential primes 01 0 1 0 1 3 Include non essential primes as 11 1 1 0 0 needed to completely cover the onset 10 1 1 0 1 (all cells of value one) 16 K-maps with Don’t Cares A B C D Y Y 0 0 0 0 1 AB 0 0 0 1 0 CD 00 01 11 10 0 0 1 0 1 0 0 1 1 1 00 0 1 0 0 0 0 1 0 1 X 0 1 1 0 1 01 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 11 1 0 1 0 X 1 0 1 1 X 1 1 0 0 X 10 1 1 0 1 X 1 1 1 0 X 1 1 1 1 X 17 K-maps with Don’t Cares A B C D Y Y 0 0 0 0 1 AB 0 0 0 1 0 CD 00 01 11 10 0 0 1 0 1 0 0 1 1 1 00 1 0 X 1 0 1 0 0 0 0 1 0 1 X 0 1 1 0 1 01 0 X X 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 11 1 1 X X 1 0 1 0 X 1 0 1 1 X 10 1 1 X X 1 1 0 0 X 1 1 0 1 X 1 1 1 0 X 1 1 1 1 X 18 K-maps with Don’t Cares Y A B C D Y CD AB 00 01 11 10 0 0 0 0 1 0 0 0 1 0 00 1 0 X 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 01 0 X X 1 0 1 0 1 X 0 1 1 0 1 0 1 1 1 1 11 1 1 X X 1 0 0 0 1 1 0 0 1 1 1 0 1 0 X 10 1 1 X X 1 0 1 1 X 1 1 0 0 X 1 1 0 1 X Y = A + BD + C 1 1 1 0 X 1 1 1 1 X 19 Reducing Canonical expressions Given F(a,b,c,d) = Σm (0, 1, 2, 8, 14) D(a,b,c,d) = Σm (9, 10) 1 Draw K-map ab 01 11 10 cd 00 00 01 11 10 20