Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CSE370, Lecture 7 Lecture 9 u Logistics n HW3 posted, due on Friday n Lab3 this week u Last lecture n Verilog u Last last lecture n K-maps examples n.

Similar presentations


Presentation on theme: "1 CSE370, Lecture 7 Lecture 9 u Logistics n HW3 posted, due on Friday n Lab3 this week u Last lecture n Verilog u Last last lecture n K-maps examples n."— Presentation transcript:

1 1 CSE370, Lecture 7 Lecture 9 u Logistics n HW3 posted, due on Friday n Lab3 this week u Last lecture n Verilog u Last last lecture n K-maps examples n K-map high dimension example n Don’t cares u Today n Don’t care (review) n POS minimization with K-map n Design examples with K-map 9

2 2 CSE370, Lecture 7 The “WHY” slide u Don’t cares n Sometimes the logic output doesn’t matter. When we don’t care if the output is 0 or 1, rather than assigning random outputs, it is best to denote it as “Don’t care.” If you learn how to use the “don’t care’s”, you will be able to build even more efficient circuits than without them. u Design examples with K-map n Doing K-map is fun, but when it is combined with an actual design problem you will see how k-map fits into the whole scheme of logic design. 9

3 3 CSE370, Lecture 7 Revisit Don’t cares example: Truth table for a BCD increment-by-1 ABCDWX YZ 00000001 00010010 00100011 00110100 01000101 01010110 01100111 01111000 10001001 10010000 1010XXXX 1011XXXX 1100XXXX 1101XXXX 1110XXXX 1111XXXX INPUTS OUTPUTS Function F computes the next number in a BCD sequence If the input is 0010 2, the output is 0011 2 BCD encodes decimal digits 0–9 as 0000 2 –1001 2 Don’t care about binary numbers 1010 2 –1111 2 9

4 4 CSE370, Lecture 7 Example: with don’t cares  F(A,B,C,D) =  m(1,3,5,7,9) + d(6,12,13) n F = A'D + B'C'Dwithout using don't cares n F = A'D + C'Dusing don't cares 00X011X111000X0000X011X111000X00 AB CD A B D 00011110 00 01 11 10 C Assign X == "1"  allows a 2-cube rather than a 1-cube 9

5 5 CSE370, Lecture 7 POS minimization using k-maps u Using k-maps for POS minimization n Encircle the zeros in the map n Interpret indices complementary to SOP form 10010100111111111001010011111111 AB CD A B D 00011110 00 01 11 10 C F = (B’+C+D)(B+C+D’)(A’+B’+C) Same idea as the Truth Table 9

6 6 CSE370, Lecture 7 Design example: a two-bit comparator block diagram truth table Need a 4 -variable Karnaugh map for each of the 3 output functions LT EQ GT ABCDLTEQGT 0000010 01100 10100 11100 0100001 01010 10100 11100 1000001 01001 10010 11100 1100001 01001 10001 11010 AB CD ABCDABCD 9

7 7 CSE370, Lecture 7 Design example: a two-bit comparator (con’t) LT = A'B'D+A'C+B'CD D 00001000110111000000100011011100 AB CD A 00011110 00 01 11 10 C B D 01110011000000100111001100000010 AB CD A 00011110 00 01 11 10 C B D 10000100001000011000010000100001 AB CD A 00011110 00 01 11 10 C B GT = BC'D'+AC'+ABD' EQ = A'B'C'D'+A'BC'D+ABCD+AB'CD' = (A xnor C)(B xnor D) K-map for EQK-map for LTK-map for GT 9

8 8 CSE370, Lecture 7 u Two ways to implement EQ: Option 1: EQ = A'B'C'D'+A'BC'D+ABCD+AB'CD‘ 5 gates but they require lots of inputs Option 2 EQ = (A xnor C) (B xnor D) XNOR is constructed from 3 simple gates 7 gates but they all have 2 inputs each Design example: a two-bit comparator (con’t) 9

9 9 CSE370, Lecture 7 Design example: a two-bit comparator (con’t) Circuit schematics 9

10 10 CSE370, Lecture 7 Design example: BCD increment by 1 I8I4I2I1O8O4O2O1 00000001 00010010 00100011 00110100 01000101 01010110 01100111 01111000 10001001 10010000 1010XXXX 1011XXXX 1100XXXX 1101XXXX 1110XXXX 1111XXXX O1 O2 O4 O8 I1 I2 I4 I8 block diagram truth table 9 Need a 4 -variable Karnaugh map for each of the 4 output functions

11 11 CSE370, Lecture 7 O8 O4 O2 O1 00X100X001XX00XX00X100X001XX00XX I1 I8 I2 I4 00X011X000XX11XX00X011X000XX11XX 01X001X010XX01XX01X001X010XX01XX 11X100X000XX11XX11X100X000XX11XX I1 I8 I2 I4 I1 I8 I2 I4 I1 I8 I2 I4 We greatly simplify the logic by using the don’t cares O 8 = I 4 I 2 I 1 + I 8 I 1 ‘ O 4 = I 4 I 2 ' + I 4 I 1 ' + I 4 'I 2 I 1 O 2 = I 8 'I 2 'I 1 + I 2 I 1 ‘ O 1 = I 1 ' Design example: BCD increment by 1 (con’t) 9

12 12 CSE370, Lecture 7 u Draw the circuit schematic n O 8 = I 4 I 2 I 1 + I 8 I 1 ' n O 4 = I 4 I 2 ' + I 4 I 1 ' + I 4 'I 2 I 1 n O 2 = I 8 'I 2 'I 1 + I 2 I 1 ' n O 1 = I 1 ' Design example: BCD increment by 1 (con’t) 9

13 13 CSE370, Lecture 7 Design example: a two-bit multiplier A2A1B2B1P8P4P2P1 00000000 010000 100000 110000 01000000 010001 100010 110011 10000000 010010 100100 110110 11000000 010011 100110 111001 P1 P2 P4 P8 A1 A2 B1 B2 block diagram truth table 9 Need a 4 -variable Karnaugh map for each of the 4 output functions

14 Two-bit multiplier (cont'd) 00000000000100110000000000010011 B1 A2A1 B2B1 A2 00011110 00 01 11 10 B2 A1 00000110011000000000011001100000 B1 A2A1 B2B1 A2 00011110 00 01 11 10 B2 A1 00000000001000000000000000100000 B1 A2A1 B2B1 A2 00011110 00 01 11 10 B2 A1 00000011010101100000001101010110 B1 A2A1 B2B1 A2 00011110 00 01 11 10 B2 A1 P8=A2A1B2B1P8=A2A1B2B1 P 2 =A 2 'A 1 B 2 +A 1 B 2 B 1 ' +A 2 B 2 'B 1 +A 2 A 1 'B 1 P 4 =A 2 B 2 B 1 ' +A 2 A 1 'B 2 P1=A1B1P1=A1B1


Download ppt "1 CSE370, Lecture 7 Lecture 9 u Logistics n HW3 posted, due on Friday n Lab3 this week u Last lecture n Verilog u Last last lecture n K-maps examples n."

Similar presentations


Ads by Google