Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CSE20 Lecture 16 Boolean Algebra: Applications Professor CK Cheng CSE Dept. UC San Diego 1.

Similar presentations


Presentation on theme: "1 CSE20 Lecture 16 Boolean Algebra: Applications Professor CK Cheng CSE Dept. UC San Diego 1."— Presentation transcript:

1 1 CSE20 Lecture 16 Boolean Algebra: Applications Professor CK Cheng CSE Dept. UC San Diego 1

2 2 Outlines Introduction Light Switches Bit Counter Multiplication Multiplexer Priority Encoder Summary

3 3 Introduction Language Description Truth Table Karnaugh Map Minimal Expression Digital Logic Networks

4 4 Light Switches Given two switches A, B with two states (Up, Down), the switches control one light emitter Y. Initially A=B=Down, and Y=Off. The light Y is turned between Off and On when one of the switch changes its state. Describe Y as a function of A and B. 4 Assignment: A, B are in {0, 1} (Down, Up) Y is in {0,1} (Off, On)

5 5 Light Switches Truth TableKarnaugh Map 5 IdABY 0000 1011 2101 3110 YA=0A=1 B=001 B=110

6 6 Light Switches Minimal Expression in sum of products format. Y(A,B)=A’B+AB’ 6

7 7 Bit Counter Input: Three binary bits (A, B, C) Output: (S 1,S 0 ) that counts the number of 1’s in (A, B, C). Derive minimal expressions of (S 1,S 0 ). For example: (A,B,C)=(0,0,0) => (S 1,S 0 )=(0,0) 0: Binary code (A,B,C)=(1,1,0) => (S 1,S 0 )=(1,0) 2: Binary code (A,B,C)=(1,1,1) => (S 1,S 0 )=(1,1) 3: Binary code

8 8 Bit Counter IdABCS1S1 S0S0 000000 100101 201001 301110 410001 510110 611010 711111 Truth TableKarnaugh Map 8 S1S1 B,C 0,0 B,C 0,1 B,C 1,1 B,C 1,0 A=00010 A=10111 S0S0 B,C 0,0 B,C 0,1 B,C 1,1 B,C 1,0 A=00101 A=11010

9 9 Bit Counter Karnaugh Map 9 S1S1 B,C 0,0 B,C 0,1 B,C 1,1 B,C 1,0 A=00010 A=10111 S0S0 B,C 0,0 B,C 0,1 B,C 1,1 B,C 1,0 A=00101 A=11010 S 1 =AB+BC+AC S 0 =AB’C’+ABC+ A’B’C+A’BC’

10 10 Multiplication Input: Two binary numbers (a 1,a 0 ), (b 1,b 0 ) Output: (s 3,s 2,s 1,s 0 ) product of the two numbers. Derive minimal expressions of (s 3,s 2,s 1,s 0 ). For example: (a 1,a 0 )×(b 1,b 0 ) = (s 3,s 2,s 1,s 0 ) (0,0)×(0,0) = (0,0,0,0) (1,0)×(0,1) = (0,0,1,0) (1,1)×(1,0) = (0,1,1,0) (1,1)×(1,1) = (1,0,0,1)

11 11 Multiplication: Truth Table Karnaugh Maps are left as exercises. Ida1a1 a0a0 b1b1 b0b0 s3s3 s2s2 s1s1 s0s0 000000000 100010000 200100000 300110000 401000000 501010001 601100010 701110011 810000000 910010010 1010100100 1110110110 1211000000 1311010011 1411100110 1511111001 11

12 12 Multiplication Input: Two binary numbers (a 1,a 0 ), (b 1,b 0 ) Output: (s 3,s 2,s 1,s 0 ) product of the two numbers. A minimal expression: s 3 =a 1 a 0 b 1 b 0 s 2 =a 1 b 1 b 0 ’+a 1 a 0 ’b 1 s 1 =a 1 ’a 0 b 1 +a 0 b 1 b 0 ’+a 1 a 0 ’b 0 +a 1 b 1 ’b 0 s 0 =a 0 b 0 Verification: (a 1,a 0 ), (b 1,b 0 ) are symmetric in the expressions.

13 13 Multiplexer Input: Three binary bits S (select), A, B (data) Output: Y If S=0, then Y=B; else Y=A. For example: (S,A,B)=(0,1,0) => Y= 0. (S,A,B)=(1,1,0) => Y= 1. (S,A,B)=(1,0,1) => Y= 0.

14 14 Multiplexer Truth TableKaraugh Map IdSABY 00000 10011 20100 30111 41000 51010 61101 71111 YAB 0,0 AB 0,1 AB 1,1 AB 1,0 S=00110 S=10011 Y=S’B+SA

15 15 Multiplexer Input: Three binary bits S (select), A, B (data) Output: Y If S=0, then Y=B; else Y=A. Minimal Expression: Y=S’B+SA

16 16 Priority Encoder Input: Three binary bits E (Enable), D 1, D 0 (Devices IDs) Output: A, Y If E=0, then A=Y=0; Else if D 0 =1, A=1, Y=0; (Let Device 0 take higher priority) Else if D 1 =1, A=1, Y=1; Else A=0, Y=0. For example: (E,D 1,D 0 )=(0,1,0) => Y= 0, A=0. (E,D 1,D 0 )=(1,0,1) => Y= 0, A=1. (E,D 1,D 0 )=(1,1,0) => Y= 1, A=1. (E,D 1,D 0 )=(1,0,0) => Y= 0, A=0.

17 17 Priority Encoder Truth TableKaraugh Maps IdED1D1 D0D0 AY 000000 100100 201000 301100 410000 510110 611011 711110 YD 1 D 0 0,0 D 1 D 0 0,1 D 1 D 0 1,1 D 1 D 0 1,0 E=00000 E=10001 AD 1 D 0 0,0 D 1 D 0 0,1 D 1 D 0 1,1 D 1 D 0 1,0 E=00000 E=10111

18 18 Priority Encoder Input: Three binary bits E (Enable), D 1, D 0 Output: A, Y If E=0, then A=Y=0; Else if D 0 =1, A=1, Y=0; Else if D 1 =1, A=1, Y=1; Else A=0, Y=0. Minimal Expression: Y=ED 1 D 0 ’ A=ED 1 +ED 0

19 Quiz For the above Priority Encoder, let D 1 take higher priority. Derive the minimal expression of the outputs A and Y. 19

20 20 Summary Language Description Combinatorial Systems Truth Table #variables <7 Karnaugh Maps Two level optimization Minimal Expressions Logic Networks


Download ppt "1 CSE20 Lecture 16 Boolean Algebra: Applications Professor CK Cheng CSE Dept. UC San Diego 1."

Similar presentations


Ads by Google