University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf ·...

21
University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS EECS 150 K. Pister Spring 2006 Part 1: From Katz Fall 2005 Lecture 3, Page 9 minimized functions: W = A + B D + B C X = B C' Y = B + C Z = A'B'C'D + B C D + A D' + B' C D'

Transcript of University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf ·...

Page 1: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

University of California at Berkeley College of Engineering

Department of Electrical Engineering and Computer Science

SOLUTIONS EECS 150 K. Pister Spring 2006 Part 1: From Katz Fall 2005 Lecture 3, Page 9

minimized functions: W = A + B D + B C X = B C' Y = B + C Z = A'B'C'D + B C D + A D' + B' C D'

Page 2: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

Chapter 4: Problems 1,4,7,8,14,18,20,21,22,25,28 Problem 4.1: Implement a 4-Bit Even-Parity Function Using XOR gates: ((A XOR B) XOR (C XOR D))’ Total 4 XOR Gates, as the inverter can be implemented with one XOR. Or 1 XOR Gate Package Using NAND gates: An XOR gate can be made using 4 NAND gates. Therefore the function can be implemented with 13 NAND Gates (4*3 + 1). Or 4 NAND Gate Packages. Problem 4.4 7 Segment Decoder C0= A + BD + C + B’D’ C1=A+C’D’+CD+B’ C2=A+B+C’+D C3=B’D’+CD’+BC’D +B’C C4=B’D’+CD’ C5=A+C’D’+BD’+BC’ C6=A+CD’+BC’+B’C

Page 3: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department
Page 4: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

Problem 4.7 Implement the following functions using multiplexers a) F(P,Q,R) = (PQ+R)’ Using 8:1 MUX 1 0 0 1 1 2 0 3 1 4 0 5 0 6 0 7 P Q R b) F(P,Q,R,S,T) = (P+Q)S + (R+T)S’ Using 2:1 MUX and 2 OR Gates

R

T

P

Q

0

1

S

Page 5: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

c) F(P,Q,R,S,T) = PQR + ST Using 32:1 MUX 0 0 0 1 0 2 1 3 0 4 0 5 0 6 1 7 0 8 0 9 0 10 1 11 0 12 0 13 0 14 1 15 0 16 0 17 0 18 1 19 0 20 0 21 0 22 1 23 0 24 0 25 0 26 1 27 1 28 1 29 1 30 1 31 P Q R S T

Page 6: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

d) f(P,Q,R,S,T) = (P(Q+RST))’ Using 32:1 MUX 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 0 23 0 24 0 25 0 26 0 27 0 28 0 29 0 30 0 31 P Q R S T Problem 4.8 Multiplexers versus Demultiplexers Demultiplexers: Takes a n-bit control and routes the input to one of the 2n output. Decoder: Works the same as Demux, except the data input is considered to be a special signal used to enable or select one of an array of similar components. Multiplexer: A n-bit control determines which 2n input is connected to the output.

Page 7: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

Problem 4.14 Decoder Implementation a) f(P,Q,R) = (PQ+R)’ Using a 3:8 Decoder 0 1 2 EN 3 4 5 6 7

P Q R b) f(P,Q,R,S,T) = (P+Q)S+(R+T)S’ Using two 2:4 Decoders 0 S 1 2 3 P Q . 0 S’ 1 2 3

R T c) f(P,Q,R,S,T) = P’Q’R’(S+T) Using a 2:4 Decoder P 0 Q 1 R 2 3 S T

Page 8: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

d) f(P,Q,R,S,T) = (P(Q+RST))’ Using a 5:32 Decoder 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 EN 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 P Q R S T

Page 9: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

Problem 4.18 Regular Logic Implementation Methods F(A,B,C,D) = AB’C + AD + AC a) Using 8:1 MUX 0 0 0 1 0 2 0 3 F D 4 1 5 D 6 1 7 A B C b) A 4:16 Decoder with 16 Input OR Gate 0 1 2 3 4 5 6 EN 7 8 9 10 11 12 13 14 15

A B C D

Page 10: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

c) 16 Word x 1 Bit / Word ROM

0 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 F 8 0 9 1 10 1 11 1 12 0 13 1 14 1 15 1

A B C D d) PLA Structure

Page 11: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

e) A 4-Input Lookup Table

0 0 0 0 0 0 0 0 F 0 1 1 1 0 1 1 1

A B C D f) MUX Based Logic

C D

0

1

0

AF

Problem 20 Regular Logic Implementation Methods F(A,B,C,D) = (A’ + B)(A’ + C + D)(A + C’ + D) CD\AB 00 01 11 10 00 X 1 0 0 01 1 1 1 X 11 1 1 1 0 10 X 0 1 X

Page 12: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

a) F in canonical product-of-sums form F = (A’+B’+C+D)(A’+B+C+D)(A’+B+C’+D’)(A+B’+C’+D) b) F in canonical sum-of-product form F = A’BC’D’ + A’B’C’D + A’BC’D + ABC’D + A’B’CD + A’BCD + ABCD + ABCD’ c) F in minimized sum-of-product form F = BD + A’C’ + A’D +ACD’ d) F with Single Three-stack by three input AND-OR-Invert Gate F’ = AB’+AC’D’+A’CD’

A

B’

AC’D’

A’CD’

e) 8:1 Mux 1 0 1 1 1 2 D 3 F 0 4 0 5 D 6 1 7 f) “Don’t Care” in MUX Y = (So+S1)’(SOA’D0 + SOAD1) + (S0+S1)(SOB’D2 + SOBD3) Y = (A + 0)’(C’1+CD)+(A+0)(D’C+DB) Y = A’(C’+CD) + A(D’C+DB)

Page 13: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

1

D

C

B

C

A 0

D

F

Problem 4.21 Regular Logic Implementation Methods X(A,B,C,D) = ∑m(1,2,3,5,7,9,11,13,15) Y(A,B,C,D) = ∏M(2,3,4,5,6,7,8,10,12,14) Z(A,B,C,D) = ∑m(0,1,2,3,5,7) a) Minimum Sum-Of-Products X(A,B,C,D) = D+ A’B’C Y(A,B,C,D) = AD + A’B’C’ Z(A,B,C,D) = A’D + A’B’ 6 Unique Terms b) Sum-Of-Products with minimum unique terms X(A,B,C,D) = AD + A’D + A’B’C Y(A,B,C,D) = AD + A’B’C’ Z(A,B,C,D) = A’D + A’B’C’ + A’B’C 4 Unique Terms

Page 14: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

c) Implement in PLA Structure

Page 15: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

Problem 4.22 Rom Based Implementation Schematic for Read-Only Memory with 65,536 words by 8 bit wide, using 2764 EPROM (Fig 4.54) 8 K-by-8-bit Rom a) Use Single 3:8 Decoder and Inverters Use Eight 8192 word by 8-bit ROM.

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

A15 A14 A13

0

1

2

3

4

5

6

7

Page 16: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

b) Use a single 2:4 Decoder and Inverters

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

/CS

/OE

A[12:0] O[7:0]

A14 A13

0

1

2

3

EN

A15

Page 17: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

Problem 4.25 Combinational Multiplier A B C D Y3 Y2 Y1 Y0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 Y3 1 Y3=ABCD Y2 1 1 1 Y2=AB’C+ACD’ Y1 1 1 1 1 1 1 Y1=AC’D+AB’D+BCD’+A’BC

Page 18: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

Y0 1 1 1 1 Y0=BD

Page 19: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department
Page 20: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

Problems 4.28 BCD to Seven Segment LED C0 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 1 C0 = B’D’ + AC’D’+AB’C’+A’C+BC+A’BD C1 1 1 0 1 1 0 1 1 1 1 0 0 1 0 0 1 C1 = B’D’+A’C’D’+A’B’+AC’D+A’CD C2 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 C2 = A’C’+A’D+A’B+AB’+C’D C3 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 C3 = AD’+B’C+B’D’+CD’+BC’D C4 1 0 1 1 0 0 1 0 0 0 1 1 1 1 1 1 C4 = AC + CD’ + B’D’ + AB C5 1 1 1 1 0 1 0 1 0 0 1 1 0 1 1 0 C5 = C’D’+BD’+A’BC’+ADC+DAB’

Page 21: University of California at Berkeley College of Engineering …cs150/sp06/HWs/hw3soln.pdf · 2006-02-14 · University of California at Berkeley College of Engineering Department

C6 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 C6 = AD+CD’+B’C+A’BC’+AB’