#### You've reached the end of your free preview.

Want to read both pages?

**Unformatted text preview: **2.40. The minimum-cost SOP expression for the function f (x1 , x2 , x3 ) = m(3, 4, 6, 7) is f = x1 x3 + x2 x3
The corresponding circuit implemented using NAND gates is
x1 Hx3
omework 3 Solutions ECE 152A
Summer 2011
H.O. #8 f
x2 2.41. A minimum-cost SOP expression for the function f (x1 , x2 , x3 ) = m(1, 3, 4, 6, 7) is f = x1 x2 + x1 x3 + x1 x3
The corresponding circuit implemented using NAND gates is 3.9. Vf V
x 2x 3
x1
Vx
4 f
x3
Vx 1 Vx 2 2.42. Minimum SOPcexpressionxfor fsiis n for the function f (x1 , x2 , x3 ) =
3.10. The minimum- ost POS e pres o m(3, 4, 6, 7) is = ( 3 + x1 3 3 x + x )
= f x2 xx1 + xx)(+2x2 x43+ x1 x4 f
= (x + x )(x3 + x )
The corresponding circuit implemented using1NOR2gates is 4
which leads to the circuit Chapter 4 x1 VDD x3 f x2 4.1. SOP form: f = x1 x2 + x2 x3
POS form: f = (x1 + x2 )(x2 + x3 )
4.2. SOP form: f = x1 x2 + x1 x3 + x2 x3
POS form: f = (x1 + x3 )(x1 + x2 )(x2 + x3 ) Vf Vx
2-13
1
4.3. SOP form: f = x1 x2 x3 x4 + x1 x2 x3 x4 + x2 x3 x4
POS form: f = (x1 + x4 )(x2 Vx3x3 )(x2 + x3 + x4 )(x2 + x4 )(x1 + x3 )
+
Vx
4.4. SOP form: f = x2 x3 + x2 x4 +x2 2 x3 x4
POS form: f = (x2 + x3 )(x2 V x3 + x4 )(x2 + x4 )
+
x4 44.5. IfOPcfh rm: uit=s xmp5e+ entx4 + parx4el5 :+ x1 x3 x4 x5 + x1 x2 x4 x5
.12 S ea o circ f i i 3 x l m x3 ed se x2 at x y
f = f 1 x4 f = (x3 + x x 4
POS xorm:+ x1 x2 x3+ x41+2x5 )(x3Cosx= +5 5 )(x2 + x3 + x4 )(x1 + x3 + x4 + x5 )(x1 + x2 + x4 + x5 )
+ t4 1 x
g = x1 x3 SOP expression for f is
Cost = 21
3.11. Minimumx4 + x2 x3 x4 + x1 x3 x4 + x1 x2 x4 4.6. SOPcfombinf d cixcui3:+ x1 x5 + x1 x3 + x3 x4 + x2x4 + x1 x2 x3
In a orm: e = r 2 x t
f = x5
POS xormx4 + x1 x3+4x2 +1x3 )(3 x4+ x21+2x4 )(x3 + x4 + x5 )
f = f 2 x3 : f = (x1 x + x 2 x x1 + x x x3
g = x2 x3 x4 + x1 x3 x4 + x1 x2 x3 x4 + x1 x2 x4
The ﬁ st 3 p to uc terms
whichrleads rodthet circuit are shared, hence the total cost is 31.
4.7. SOP form: f = x3 x4 x5 + x3 x4 x5 + x1 x4 x5 + x1 x2 x4 + x3 x4 x5 + x2 x3 x4 + x2 x3 x4 x5
POS form: f = (x3 + x4 + x5 )(x3 + x4 + x5 )(x1 + x2 + x3 + x4 + x5 )
4.13. If each circuit is implemented separately:
f = x1 x2 x4 + x2 x4 x5 + x3 x4 x5 + x1 x2 x4 x5
Cost = 22
4.8. f = x x (0,x )x + x x x + x x x + x x x
g = 3 m + 74 5
Cost = 24
5
124
124
245
f = m(1, 6)
3-4
fn = combined ) ircuit:
m(2, 5 c
Ia
f = x x x0,+, x )x x + x x x + x x x x
f = 1 m( 4 1 62 4 5
2
345
1245
f = m( 2 5 )
g = x1 x2 x0,+,x2 x4 x5 + x3 x4 x5 + x1 x2 x4 x5 + x3 x5
4
etc.
The ﬁrst 4 product terms are shared, hence the total cost is 31. Note that in this implementation f ⊆ g , thus
g = x1 x r x3 z d x x = f + x x , i x2 x ic 4
4.9. f can be 2eali+ex1as2g 4 + x1 x33x45+n wh3 xh case the total cost is lowered to 28.
4.14. f OP (x3m: g ) = ((1 x2 x3 + x4 ) wh4 re g 1 x3 x4 + (x2 2 x32+ x1((3 x4 ↑ xx) x3x2 )
0 S = for ↑ f ↑ xg ↑ g ) ↑ x1 x2 x e + x = ( 1 ↑ x1 x↑ x )) ↑ x x1 + 1 2 ↑ 4
POS form: f = (x1 + x2 + x3 )(x1 + x2 + x4 )(x1 + x3 + x4 )(x2 + x3 + x4 )(x1 + x2 + x3 + x4 )
The POS form has lower cost.
4.15. f = (((x3 ↓ x3 ) ↓ g ) ↓ ((g ↓ g ) ↓ (x4 ↓ x4 )), where
4.11. The statemex1 ) s↓fal2 ) .↓As 1 co(x2te↓ example en,nfiderff↓x1., x2 , x3 ) = m(0, 5, 7).
g = ((x1 ↓ nt i x se (xa ↓ un r x2 )). Th co s = ( f
Then, the minimum-cost SOP form f = x1 x3 + x1 x2 x3 is unique.
But, there are two minimum-cost POS forms:
4.16. f = (g ↑+ ) ↑)((g ↑ gx ↑ (x ↑ kx),)where g = (x1 ↑ x1 ) ↑ (x2 ↑ x2 ) ↑ (x5 ↑ x5 )
f = (x1 k x3 (x1 + ) 3 ) (k1 + ) 2 and
and k = (x3 ↑ (x4 ↑ x4 )) ↑ ((x3 ↑ x3 ) ↑ x4 ) and k = (x3 ↑ (x4 ↑ x4 )) ↑ ((x3 ↑ x3 ) ↑ x4 )
4.16. f = (g ↑ k ) ↑ ((g ↑ g ) ↑ (k ↑ k )), where g = (x1 ↑ x1 ) ↑ (x2 ↑ x2 ) ↑ (x5 ↑ x5 )
and k = (x3 ↑ (x4 ↑ x4 )) ↑ ((x3 ↑ x3 ) ↑ x4 )
4.17. f = (g ↓ k ) ↓ ((g ↓ g ) ↓ (k ↓ k )), where g = x1 ↓ x2 ↓ x5
and k = ((x3 ↓ x3 ) ↓ x4 ) ↓ (x3 ↓ (x4 ↓ x4 )). Then, f = f ↓ f .
4.17. f = (g ↓ k ) ↓ ((g ↓ g ) ↓ (k ↓ k )), where g = x1 ↓ x2 ↓ x5
and k = ((x3 ↓ x3 ) ↓ x4 ) ↓ (x3 ↓ (x4 ↓ x4 )). Then, f = f ↓ f .
4.18. f = x1 (x2 + x3 )(x4 + x5 ) + x1 (x2 + x3 )(x4 + x5 ) 4.18. f = x1 (x2 + x3 )(x4 + x5 ) + x1 (x2 + x3 )(x4 + x5 )
4.19. f = x1 x3 x4 + x2 x3 x4 + x1 x3 x4 + x2 x3 x4 = (x1 + x2 )x3 x4 + (x1 + x2 )x3 x4
This requires 2 OR and 2 AND gates.
4.19. f = x1 x3 x4 + x2 x3 x4 + x1 x3 x4 + x2 x3 x4 = (x1 + x2 )x3 x4 + (x1 + x2 )x3 x4
This requires 2 OR and 2 AND gates.
4.20. f = x1 · g + x1 · g , where g = x3 x4 + x3 x4
4.20. f = x1 · g + x1 · g , where g = x3 x4 + x3 x4
4.21 The assoc+tg · th,of theeXOR x1 xraaind ha= be shown as follows:
5.6. f = g · h ia ivi y wher g = ope2 t on c n x3 + x4 Chapter 5 4.21 f = g · h + g · h, where g = x1⊕2(ynd z )= =3 + x4 (y z + y z )
x a⊕h x x⊕
4.22. Let D(0, 20) be 0 and D(15, 26) be 1. Then=ecomy z sitiy z )yield(y · z + y z )
d x( po + on + x s:
g = x5 (x1 + x2 )
45.1. Le)t Dx8 , 20+ be x4 )gd+ x1x, 26= be x4 g +ex=e4 g mpx3 x4on yieldsy · z + xy z
.22. (a= 47 0x4 ) x3 0 an D( 3 5 4 g ) x3 1. Th n 3 x co + yositi g y z + x :
d x· z+x
f ( (3
g = 43
Costx5 (9 1 + 8 2 ) 27
(b) 7= x + 1 x =
f = 02 x
(c) 2(x35 4 + x3 x4 )g + x3 x4 gx ⊕ 3 x4⊕ + x= 4 g xyx3 x4y ) ⊕ z
( = x y) g z 3x ( + + x g
Cost4=59 7 18 = 27
(d) 1 6 +
= (x2 y + xy )z + (xy + xy )z
4- ·
( e) 6 1 6 8 0
= x · y z + xy z + xy z + xy · z
4-2
The two SOP expressions are the same.
5.2. (a) 478
(b) −280
(c − c
5.7. In)the 1 ircuit of Figure 5.5b, we have:
si
5.3. (a) 478
(b) −281
(c) −2
5 .4 . 5 .8 . 5 .5 . 5 .9 . =
= (xi ⊕ yi ) ⊕ ci
xi ⊕ yi ⊕ ci ci+1 = (xi ⊕ yi )ci + xi yi = (xi yi + xi y i )ci + xi yi
The numbers are represented as follows:
= xi yi ci + xi y i ci + xi yi
Decimal Sign and Magnitude 1’s Complement+ xi’si Coxiplement
2 c + m yi
= y i ci
73
000001001001
000001001001
000001001001
The expressions for1si1and 010 are the 1am11as0t010 e deri1110n11001e 5.4b.
1906
011 0 110 ci+1
01 s 10 e 1 hos
0 ved i1 Figur 0
−95
100001011111
111110100000
111110100001
−163
We will0give a 111cripti1e 110 of for 10011of10000rstand1ng. 10he 00s 0 omplement of a given number can
des 0010v1 pro
ease 0 unde 1
i 001 T 10 2’ 1 c
be found by adding 1 to the 1’s complement of the number. Suppose that the number has k 0s in the leastsigniﬁcant bit positions, bk−1 . . . b0 , and it has bk = 1. When this number is converted to its 1’s complement,
Tachrosultesof khbitsphaationsvare:e 1. Adding 1 to this string of 1s produces b k bk−1 bk−2 . . . b0 = 100 . . . 0.
e he e f ths e t e o er s the alu
This result is equivalent to copying the k 0s and the ﬁrst 1 (in bit position b k ) encountered when the number
bu
0 t 11 10
11 ﬁ ( n
1 t 1 111
33)
is(ac: nned00rom1r1ght to 54ft. (S):ppose 1hat0the1most-signi7 cantc): − k1bi0s,1b n−1 bn−(−. . bk , have some
s)a
f 110 i 0
le
2.
+ t 1 0 1 ’ 1 co
− tt
+wi1 10 co le −72 e
pattern o+010and 01 , but6bk = 1. In 1he 11s 10 mplemen34 his pattern 10ll1be 00 mp+(ment) d in each bit
f 0s 001 1s + 9
01ich wil
1 ud
position, wh111011l incl23 e bk = 0. 010w0011 ing 1 to 8he entire n-b1t0numbe1 wil(l−1ake b k = 1, but
No 1 , add
t3
i 01011 r
m 05)
no further carries will be generated; therefore, the complemented bits in positions b n−1 bn−2 . . . bk+1 will
da
0011011
5 4 ( e) :
01110101
(117) (f ):
11010011
(−45)
re(m):in unchanged.0
−00101011 −43
−11010110 −(− 42)
−11101100 −(−20)
Construct 0he 0r10h 1able 11
t 00 t ut 1 t
10011111
(159)
11100111
(−25)
xn−1 yn−1 cn−1 cn sn−1 (sign bit) Overﬂow
0
0
Arithmetic overﬂow occurs in example e; n0 te that0the pattern0 0011111 repr0 sents −97 rather than +159.
o
1
e
0
0
1
0
1
1
0
1
0
0
1
0
0
1
1
1
0
0
1
0
0
0
1
0
1
0
1
1
0
0
1
1
0
1
0
1
1
1
1
1
1
0
Note that overﬂow cannot occur when two numbers with opposite signs are added. From the truth table the
overﬂow expression is
Ov erf low = cn cn−1 + cn cn−1 = cn ⊕ cn−1
5-1
5-2 ...

View
Full Document

- Spring '12
- Drexel
- Gate, BMW Sports Activity Series, Emoticon, X3 X4, x2 x4, omework 3 Solutions