CSE140 HW2 Preparation Xinyuan Wang 04/20/2018.

Slides:



Advertisements
Similar presentations
KARNAUGH MAP Introduction Strategy for Minimization Minimization of Product-of-Sums Forms Minimization of More Complex Expressions Don't care Terms 1.
Advertisements

1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
CK Cheng Tuesday 10/2/02 CS 140 Lecture 2. Part I. Combinational Logic I) Specification –a. Language –b. Truth Table –c. Boolean Algebra –d. Incompletely.
CS 140 Lecture 4 Combinational Logic: K-Map Professor CK Cheng CSE Dept. UC San Diego 1.
11.1 Boolean Functions. Boolean Algebra An algebra is a set with one or more operations defined on it. A boolean algebra has three main operations, and,
طراحی مدارهای منطقی نیمسال دوم دانشگاه آزاد اسلامی واحد پرند.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary.
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
1 Chapter 5 Karnaugh Maps Mei Yang ECG Logic Design 1.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Optimization Algorithm
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
Conversion from one number base to another Binary arithmetic Equation simplification DeMorgan’s Laws Conversion to/from SOP/POS Reading equations from.
Chapter 2 Boolean Algebra and Minimization Techniques.
1 Example: Groupings on 3-Variable K-Maps BC F(A,B,C) = A ’ B ’ A BC F(A,B,C) = B ’ A
Karnaugh Maps (K maps).
EECS 270 Lecture 10. K-map “rules” – Only circle adjacent cells (remember edges are adjacent!) – Only circle groups that are powers of 2 (1, 2,
K-map Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
1 EENG 2710 Chapter 3 Simplification of Switching Functions.
Boolean Algebra How gates get picked. Boolean Arithmetic Boolean ≠ Binary – Boolean – 1/0 only, no places Boolean addition:
Lecture 3: Incompletely Specified Functions and K Maps
De Morgan’s Theorem,.
Chapter 2: Boolean Algebra and Logic Functions
ECE 2110: Introduction to Digital Systems
ECE 3110: Introduction to Digital Systems
Plotting functions not in canonical form
Princess Sumaya University
CHAPTER 3 SETS AND BOOLEAN ALGEBRA
ECE 2110: Introduction to Digital Systems
Karnaugh Maps.
Optimized Implementation of Logic Function
CSE 140 : Components and Design Techniques for Digital Systems
Digital Logic and Design
CSE 311 Foundations of Computing I
Boolean Algebra.
Lecture 3: Incompletely Specified Functions and K Maps
Instructor: Alexander Stoytchev
Optimized Implementation of Logic Function
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
ECE 331 – Digital System Design
Digital Logic & Design Dr. Waseem Ikram Lecture 12.
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
CSE 370 – Winter Combinational Logic - 1
ECE 331 – Digital System Design
ECE 331 – Digital System Design
Optimization Algorithm
Chapter 3 Gate-level Minimization.
Lecture 6 Karnaugh maps (K-maps) K-maps with “don’t cares”
Optimized Implementation of Logic Function
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Boolean Algebra How gates get picked.
Instructor: Alexander Stoytchev
CSE 140 Lecture 4 Combinational Logic: K-Map
Karnaugh Maps (K maps).
Laws & Rules of Boolean Algebra
Karnaugh Map Method By: Asst Lec. Besma Nazar Nadhem
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
Lecture 3: Incompletely Specified Functions and K Maps
ECE 331 – Digital System Design
Lecture 2: Combinational Logic Design
Presentation transcript:

CSE140 HW2 Preparation Xinyuan Wang 04/20/2018

Q1: Boolean Algebra Boolean Algebra ≠ Switching Algebra What makes a Boolean algebra? A multiple valued logic { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } defined over two operations {𝒐 𝒑 𝟏 ,𝒐 𝒑 𝟐 } that satisfies the following properties: Associative for any elements (𝑥,𝑦,𝑧) from { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } 𝑥 𝑜 𝑝 1 𝑦 𝑜 𝑝 1 𝑧=𝑥 𝑜 𝑝 1 (𝑦 𝑜 𝑝 1 𝑧) 𝑥 𝑜 𝑝 2 𝑦 𝑜 𝑝 2 𝑧=𝑥 𝑜 𝑝 2 (𝑦 𝑜 𝑝 2 𝑧)

Q1: Boolean Algebra Commutative Distributive for each pair of elements (𝑥,𝑦) from { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } 𝑥 𝑜 𝑝 1 𝑦= 𝑦 𝑜 𝑝 1 𝑥 𝑥 𝑜 𝑝 2 𝑦= y 𝑜 𝑝 2 𝑥 Distributive for any elements (𝑥,𝑦,𝑧) from { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } 𝑥 𝑜 𝑝 1 (𝑦 𝑜 𝑝 2 𝑧)= 𝑥 𝑜 𝑝 1 𝑦 𝑜 𝑝 2 (𝑥 𝑜 𝑝 1 𝑧) 𝑥 𝑜 𝑝 2 (𝑦 𝑜 𝑝 1 𝑧)= 𝑥 𝑜 𝑝 2 𝑦 𝑜 𝑝 1 (𝑥 𝑜 𝑝 2 𝑧)

Q1: Boolean Algebra Example Commutative Distributive for each pair of elements (𝑥,𝑦) from { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } 𝑥 𝑜 𝑝 1 𝑦= 𝑦 𝑜 𝑝 1 𝑥 𝑥 𝑜 𝑝 2 𝑦= y 𝑜 𝑝 2 𝑥 Distributive for any elements (𝑥,𝑦,𝑧) from { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } 𝑥 𝑜 𝑝 1 (𝑦 𝑜 𝑝 2 𝑧)= 𝑥 𝑜 𝑝 1 𝑦 𝑜 𝑝 2 (𝑥 𝑜 𝑝 1 𝑧) 𝑥 𝑜 𝑝 2 (𝑦 𝑜 𝑝 1 𝑧)= 𝑥 𝑜 𝑝 2 𝑦 𝑜 𝑝 1 (𝑥 𝑜 𝑝 2 𝑧) Choose elements (a,b) on operator & a&b=c=b&a

Q1: Boolean Algebra Commutative for each pair of elements (𝑥,𝑦) from { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } 𝑥 𝑜 𝑝 1 𝑦= 𝑦 𝑜 𝑝 1 𝑥 𝑥 𝑜 𝑝 2 𝑦= y 𝑜 𝑝 2 𝑥 Distributive for any elements (𝑥,𝑦,𝑧) from { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } 𝑥 𝑜 𝑝 1 (𝑦 𝑜 𝑝 2 𝑧)= 𝑥 𝑜 𝑝 1 𝑦 𝑜 𝑝 2 (𝑥 𝑜 𝑝 1 𝑧) 𝑥 𝑜 𝑝 2 (𝑦 𝑜 𝑝 1 𝑧)= 𝑥 𝑜 𝑝 2 𝑦 𝑜 𝑝 1 (𝑥 𝑜 𝑝 2 𝑧) For the homework problem, you will have 4×4×4=64 (𝑥,𝑦,𝑧) , but No Need to list them all!

Q1: Boolean Algebra Identity Complement there exist element 𝑥 such that: 𝒙 𝑜 𝑝 1 𝑎 𝑖 = 𝑎 𝑖 , for any a i ∈{ 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } We call 𝑥 the identity element of 𝑜 𝑝 1 there exist element 𝑦 such that: 𝒚 𝑜 𝑝 2 𝑎 𝑖 = 𝑎 𝑖 , for any a i ∈{ 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } We call 𝑦 the identity element of 𝑜 𝑝 2 Complement each element 𝑥 has a unique complement element 𝑦 from { 𝑎 0 , 𝑎 1 ,⋯, 𝑎 𝑛 } 𝑥 𝑜 𝑝 1 𝑦= the identity element of 𝑜 𝑝 2 𝑥 𝑜 𝑝 2 𝑦= the identity element of 𝑜 𝑝 1 Boolean algebra has even number of values.

Q2: Multiplication Machine What is Multiplication between binary inputs? Given 2 n-bits input, how many bits for the output? 1 1 0 × 1 1 1 1 1 0 1 1 0 1 1 0 1 0 1 0 1 0 Truth table: with 2 𝑛-bits input elements and 𝑚-bits output Minterms & Maxterms Output will have 𝑛+𝑛 =2𝑛 bits! 3-bits 3-bits 6-bits

Q2: Multiplication Machine What is Multiplication between binary inputs? Truth table: with 2 𝑛-bits input elements and 𝑚=2𝑛 bits output Minterms & Maxterms Output Input 1 Input 2 = 1, 𝑚𝑖𝑛𝑡𝑒𝑟𝑚 𝑚 0 = 𝑎 𝑛−1 ′ 𝑎 𝑛−2 ′ ⋯ 𝑏 0 ′ 0, 𝑚𝑎𝑥𝑡𝑒𝑟𝑚 𝑀 0 = 𝑎 𝑛−1 +⋯+ 𝑏 0 id 𝑎 𝑛−1 ⋯ 𝑎 0 𝑏 𝑛−1 𝑏 0 𝑝 𝑚−1 𝑝 0 1 ⋮ ⋱ 2 2𝑛 −1 𝑝 0 = 𝑚(𝑝,𝑞,…) 𝑜𝑟 𝑀(𝑟,𝑠,..)

Q3: Priority Encoder Truth table: 𝟐 𝟖 lines ! Are all the lines necessary? don’t care terms Example: when (𝑎 7 , 𝑎 6 , 𝑎 5 , 𝑎 4 , 𝑎 3 , 𝑎 2 , 𝑎 1 , 𝑎 0 )= (0,0,0,0,0,1,0,0) (0,0,0,0,0,1,0,1) (0,0,0,0,0,1,1,0) (0,0,0,0,0,1,1,1) , the output (𝑑 2 , 𝑑 1 , 𝑑 0 )= 0,1,0 So we could simplify the 4 inputs as (0,0,0,0,0,1,𝑋,𝑋).

Q4&5: Logic Minimization Adjacency: two minterms (maxterms) are adjacent, if they differ only in one variable We can merge each Adjacent pair into one term ! K-maps searching for adjacent pairs are the basis of logic minimization. present a visual way to efficiently look for this pairs! all neighbor cells in a K-maps are adjacent. Don’t forget the edges!!

Q4: Minimize SOP implicant, prime implicant and essential prime implicant K-map with 5 variables 𝑓(𝑎,𝑏,𝑐,𝑑,𝑒) 5 neighbors in K-map!! 𝑑𝑒\bc 00 01 11 10 1 X Is 𝑚 5,7,13 +𝑑(15) a prime implicant? 0 4 12 8 𝑎=0 1 5 13 9 3 7 15 11 2 6 14 10 Is 𝑚 6,7 an essential prime implicant? 𝑑𝑒\bc 00 01 11 10 1 X 16 20 28 24 𝑎=1 17 21 29 25 19 23 31 27 18 22 30 26

Q4: Minimize SOP implicant, prime implicant and essential prime implicant K-map with 5 variables 𝑓(𝑎,𝑏,𝑐,𝑑,𝑒) 5 neighbors in K-map!! 𝑑𝑒\bc 00 01 11 10 1 X Is 𝑚 5,7,13,15 a prime implicant? NO! It’s covered by 𝑚 5,7,13,15,21,23,29,31 0 4 12 8 𝑎=0 1 5 13 9 3 7 15 11 2 6 14 10 Is 𝑚 6,7 an essential prime implicant? Yes! 𝑚 6 is not covered by any other prime implicant 𝑑𝑒\bc 00 01 11 10 1 X 16 20 28 24 𝑎=1 17 21 29 25 19 23 31 27 18 22 30 26

Q4: Minimize SOP implicant, prime implicant and essential prime implicant K-map with 5 variables 𝑓(𝑎,𝑏,𝑐,𝑑,𝑒) 5 neighbors in K-map!! 𝑑𝑒\bc 00 01 11 10 1 X prime implicants: Essential prime implicants: Minimal SOP: 𝑓 𝑎,𝑏,𝑐,𝑑,𝑒 = ? 0 4 12 8 𝑎=0 1 5 13 9 3 7 15 11 2 6 14 10 𝑑𝑒\bc 00 01 11 10 1 X 16 20 28 24 𝑎=1 17 21 29 25 19 23 31 27 18 22 30 26

Q4: Minimize SOP implicant, prime implicant and essential prime implicant K-map with 5 variables 𝑓(𝑎,𝑏,𝑐,𝑑,𝑒) 5 neighbors in K-map!! 𝑑𝑒\bc 00 01 11 10 1 X prime implicants: 𝑚 5,7,13,15,21,23, 29,31 =𝑐𝑒 𝑚 1,5,9, 13,21,23,29,31 =𝑑′𝑒 𝑚 0,1,8,9,16,17,24,25 = 𝑐 ′ 𝑑 𝑚 6,7 = 𝑎 ′ 𝑏 ′ 𝑐𝑑 Essential prime implicants: 𝑚 𝟎,1,𝟖,9,𝟏𝟔,17,𝟐𝟒,25 = 𝑐 ′ 𝑑 𝑚 𝟔,7 = 𝑎 ′ 𝑏 ′ 𝑐𝑑 Minimal SOP: 𝑓 𝑎,𝑏,𝑐,𝑑,𝑒 = 𝑐 ′ 𝑑+ 𝑎 ′ 𝑏 ′ 𝑐𝑑+𝑐𝑒 or 𝑐 ′ 𝑑+ 𝑎 ′ 𝑏 ′ 𝑐𝑑+𝑑′𝑒 0 4 12 8 𝑎=0 1 5 13 9 3 7 15 11 2 6 14 10 𝑑𝑒\bc 00 01 11 10 1 X 16 20 28 24 𝑎=1 17 21 29 25 19 23 31 27 18 22 30 26

Q5: Minimize POS implicate, prime implicate and essential prime implicate K-map with 5 variables 𝑓(𝑎,𝑏,𝑐,𝑑,𝑒) 5 neighbors in K-map!! 𝑑𝑒\bc 00 01 11 10 1 X 0 4 12 8 𝑎=0 1 5 13 9 3 7 15 11 2 6 14 10 𝑑𝑒\bc 00 01 11 10 X 1 16 20 28 24 𝑎=1 17 21 29 25 19 23 31 27 18 22 30 26

Q5: Minimize POS implicate, prime implicate and essential prime implicate K-map with 5 variables 𝑓(𝑎,𝑏,𝑐,𝑑,𝑒) 5 neighbors in K-map!! 𝑑𝑒\bc 00 01 11 10 1 X prime implicates: 𝑀 8,9,12,13,24,25,28,29 = 𝑏 ′ +𝑑 𝑀 0,4,8,12,16, 20,24,28 =𝑑+𝑒 𝑀 12,13,14,15 =𝑎+ 𝑏 ′ +𝑐′ 𝑀 16,17,18,19 = 𝑎 ′ +𝑏+𝑐 𝑀 7,15 =𝑎+ 𝑐 ′ + 𝑑 ′ +𝑒 Essential prime implicates: All the listed prime implicates Minimal POS: 𝑓 𝑎,𝑏,𝑐,𝑑,𝑒 = (𝑏 ′ +𝑑) 𝑑+𝑒 𝑑+𝑒 (𝑎+ 𝑏 ′ + 𝑐 ′ )( 𝑎 ′ +𝑏+𝑐)(𝑎+ 𝑐 ′ + 𝑑 ′ +𝑒) 0 4 12 8 𝑎=0 1 5 13 9 3 7 15 11 2 6 14 10 𝑑𝑒\bc 00 01 11 10 X 1 16 20 28 24 𝑎=1 17 21 29 25 19 23 31 27 18 22 30 26