View
12
Download
0
Category
Preview:
DESCRIPTION
Part One. HOMEWORK 1 PART B. 1. Compute the following using pipeline method a. e. i.12/4 b. f. J.49/7 c. g.3*10 d. h.91*14 2. Illustrate the generation of 4 variable Dertouzos Table - PowerPoint PPT Presentation
Citation preview
Part One
HOMEWORK 1 PART B
1. Compute the following using pipeline methoda. e. i.12/4
b. f. J.49/7
c. g.3*10
d. h.91*14
2. Illustrate the generation of 4 variable Dertouzos Table
3. Realize XOR using threshold gates
4. Realize half subtractor as a cascade of threshold gates.
5. Realize full subtractor as a cascade of threshold gates.
2/122/15.2
2/12.52/175.13
2325.5
6. Realize the following functions in cascade :
f1 = X1’X2’X4
f2 = X2X3’X4’
f3 = X1X2X3
7. realize as a cascade of threshold gates:
S = A
C0 = A’(
8. realize as a cascade of three threshold gates:
f = (0,3,4,7,9,13)
1)( CXB
1)(1') CXBCAXB
ANSWER TO QUESTION ONE
Rooting
a.
10. 00 00 00
01
----------------------
01 00 F1=1 Answer :
01 01
----------------------
01 00 00 F2 = 0
00 10 01
----------------------
00 01 11 00 F3 = 1
00 01 01 01
----------------------
00 00 01 11 F4 = 1
011.1
011.1)000000.10( 2/1
210 102
b.
10. 10 00 00
01
----------------------
01 .10 F1=1
01. 01
----------------------
00 . 01 00 F2 = 1
00 . 11 01
----------------------
00 . 01 00 00 F3 = 0 Answer :
00 . 01 10 01
------------------------
00 . 01 00 00 F4 = 0
100.1)100000.10( 2/1
2100.1
210 10.105.2
c.
0101. 00 11 00
01
----------------------
00 01 F1=1 Answer :
01 01
----------------------
00 01. 00 F2 = 0
00 10. 01
----------------------
00 01 . 00 11 F3 = 0
00 01 .00 01
----------------------
00 00 . 00 10 00 F4 = 1
00 00 .10 01 01
----------------------
00 00 .00 10 00 F5 = 0
210 001100.1012.5
00101.11
0010.1)001100.10( 2/1
d.
11 01 . 11
01
----------------------
10 01 F1=1 Answer :
01 01
----------------------
01 00 . 11 F2 = 1
00 11 .01
----------------------
00 01 . 10 F3 = 1
210 11.110175.13
102
2/1
5.31.11
1.11)11.1101(
Squaring
e.
1 1
F1 F2 Answer :
0 1 (F1 = 1)
0 1 0 1 (F2 = 1)
------------
1 0 0 1
210 113
102
2/1
5.31.11
1.11)11.1101(
f
1 0 1 . 1
F1 F2 F3 F4 Answer :
01 F1=1
00 00 F2=0
00 10 01 F3=1
00 01 01. 01 F4=1
----------------
01 11 10. 01
210 1.1015.5
2
2
01.11110
01.111101.101
Multiplication
g. 3*10 Answer :
Left shift Right shift
1 1 1 1
1 0 1 0 1 0 1 0
-------------- --------------------
0 0 1 1
1 1 0 0
0 0 1 1
1 1 0 0
----------------- ----------------------
1 1 1 1 0 1 1 1 1 0
101010
0113
10
210
3010*3
3011110 102
H 91*14
1 0 1 1 0 1 1
1 1 1 0
--------------------
1 0 1 1 0 1 1
1 0 1 1 0 1 1
1 0 1 1 0 1 1
0 0 0 0 0 0 0
-------------------------------
1 0 0 1 1 1 1 1 0 1 0
210
210
111014
101101191
DIVISION
I.12/41210 -> 11002
410 -> 1002
1100
100
----------
100 F1=1
100
------------
000 F2=1
Answer:
1100/100 = 11112 -> 310
J.49/7
110001
111
------------
1100 F1=0 Answer : 110001/111 = 0111
0111 0111 -> 710
-------------
010100 F2=1
000101
--------------
00111100 F3=1
00001101
----------------
00101111 F4=1
210
210
1117
11000149
ANSWER TO QUESTION NUMBER TWO
Arbitrary weight for W0 <= W1 <= W2 are chosen
W0=40, W1=50, W2=60
Atable of weighted sum is built for the possible minterm in 3 variables.
• Upper threshold limit is selected 150/2 = 75.
• A list of test threshold that fall between the weighted sums that are less than 75 is constructed : (-1, 20, 45, 55, 75)
• For each test threshold, a truth table is created, such that a true value is obtained if that minterms weight sum is less than test threshold.
W2 W1 W0 SUM0 0 0 00 0 1 400 1 0 500 1 1 901 0 0 601 0 1 1001 1 0 1101 1 1 150
To calculate b’s
T=-1 b0=(2x0)-8=-8 b= 8, 0, 0, 0 ---(1)
T=20 b0=(2x1)-8=-6 b=6, 2, 2, 2 ---(2)
b1,2,3=2(0-1)=-2
T=45 b0=2x2-8=-4 b=4, 4, 4, 0 ---(3)
b1=2(0-2)=4
b2=2(0-2)=4
b3=2(1-1)=0
T=55 b0=2x3-8=-2 b=2, 6, 2, 2 ---(4)
b1=2(0-3)=-6
-1 20 45 55 75000 0 1 1 1 1001 0 0 1 1 1010 0 0 0 1 1011 0 0 0 0 0100 0 0 0 0 1101 0 0 0 0 0110 0 0 0 0 0111 0 0 0 0 0
b2=2(1-2)=-2
b3=2(1-2)=-2
T=75 b0=2x4-8=0 b=0, 4, 4, 4 ---(5)
b1=2(1-3)=-4
b2=2(1-3)=-4
b3=2(1-3)=-4 combination b vector1,1 16 0 0 0 01,2 14 2 2 2 21,3 12 4 4 0 41,4 10 6 2 2 61,5 8 4 4 4 82,2 12 4 4 4 02,3 10 6 6 2 22,4 8 8 4 4 42,5 6 6 6 6 63,3 8 8 8 0 03,4 6 10 6 2 23,5 4 8 8 4 44,4 4 12 4 4 04,5 2 10 6 6 25,5 0 8 8 8 0
Each vector is then sorted in decending order and duplicates are eliminated
b vector After sorting16 0 0 0 0 16 0 0 0 014 2 2 2 2 14 2 2 2 212 4 4 4 0 12 4 4 4 010 6 6 2 2 10 6 6 2 28 8 4 4 4 8 8 8 0 0
12 4 4 4 0 8 8 4 4 410 6 6 2 2 6 6 6 6 68 8 4 4 46 6 6 6 68 8 8 0 010 6 6 2 28 8 4 4 4
12 4 4 4 010 6 6 2 28 8 8 0 0
ANSWER TO QUESTION NUMBER THREE
Realization of XOR
f=x’y+xy’
Take each minterm and realize it with one threshold gate,
and then OR them
f1=x’y, f2=xy’
f1: 0 1 x -1
-------- 1/2
N(1) 0 1
N(0) 1 0 y 1 1 1/2
T=0.5 x 1 1
1/2
f2: 1 0
-------- y -1
N(1) 1 0
N(0) 0 1
T=0.5
x y XOR0 0 00 1 11 0 11 1 0
2)01(2
2)10(2
22)1(2
2
1
20
b
b
b
1
1
1
2
1
0
a
a
a
2
2
22)1(2
2
1
20
b
b
b
1
1
1
2
1
0
a
a
a
ANSWER TO QUESTION NO 4
Realiazation of half subtractor
B=x’y
D=x’y-xy’=B+xy’
For B=x’y
Determine positive function B=xy
Find all Minimum True and Maximum False vertices
x y The Inequalities:
0 0 Wx + Wy > Wy => Wx > 0
F 0 1 W x + Wy > Wx => Wy > 0
F 1 0 Choose Wx = Wy = 1
Tmin 1 1
X Y B D0 0 0 00 1 1 11 0 0 11 1 0 0
So,
UL = 1x1 + 1x1 = 2 For every input which is complimented in the original function, its weight
LL = 1x1 + 0x1 = 1 must be changed to -W and T to T-W
T = 3/2 Wx = -1, Wy = 1, T = 1/2
For D = B + xy’
Generate the truth table for the 3-variable B, x, y and find the Minimum True and Maxumum False vertices
The positive function:
D = B + xy
Tmin 0 0 1
1 1 0
Fmax 1 0 0
0 1 0
x y B0 0 0
Tmin 0 0 1F 0 1 0T 0 1 1F 1 0 0T 1 0 1Tmin 1 1 0T 1 1 1
The inequalities :
W3 > W1
W3 > W2
W1 + W2 > W1 => W2 > 0
W1 + W2 > W2 => W1 > 0
choose W1 = W2 = 1, W3 = 2
UL = 1, LL = 2, T = 3/2
Architecture of Half-Subtractor :
REALIZE OF A FULL ADDER
A B C S C00 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
)7,6,4,2(
),7,4,2,1(
0C
S
7
)4,2,1(
1
1
SS
S
S1=A’B’C’+C0 S1= =(A+B+C) C0’ S= (A+B+C) C0’
REALIZATION OF FULL SUBTRACTOR
B = x’y + x’z + yz
D = x’y’z + x’yz’ + xyz + xy’z’
Let,
D1 = D + x’yz
= x’y’z + x’yz’ + xyz + xy’z’ + x’yz
D1 = B + xy’z’
D = (B + xy’z’) - x’yz
D = (B + xy’z’)(x + y’ + z’)
x y x B D0 0 0 0 00 0 1 1 10 1 0 1 10 1 1 1 01 0 0 0 11 0 1 0 01 1 0 0 01 1 1 1 1
x y z B xy'z' B+xy'z' x+y'+z' D0 0 0 0 0 0 1 00 0 0 1 0 1 1 10 0 1 0 0 0 1 00 0 1 1 0 1 1 10 1 0 0 0 0 1 00 1 0 1 0 1 1 10 1 1 0 0 0 0 00 1 1 1 0 1 0 01 0 0 0 1 1 1 11 0 0 1 1 1 1 11 0 1 0 0 0 1 01 0 1 1 0 1 1 11 1 0 0 0 0 1 01 1 0 1 0 1 1 11 1 1 0 0 0 1 01 1 1 1 0 1 1 1
0 0 0 10 0 1 10 1 0 11 0 0 01 0 0 1 Unate1 0 1 1 1 1 0 11 1 1 1
N(1) 5 3 3 7 N(0) 3 5 5 1
b0 = 2x8 - 16 = 0 b4 b3 b2 b1 b0
b1 = 2(5-3) = 4 12 -4 -4 4 0
b2 = -4 2 -1 -1 1 0
b3 = -4 a4 a3 a2 a1 a0
b4 = 12
2/1
1)1(2/1
0)1(2/1
1
0
0
T
aUL
aLL
REALIZATION OF THE FOLLOWING THREE FUNCTION IN CASCADE
f1 = x1’ x2’ x4
f2 = x2 x3’ x4’
f3 = x1 x2 x3
1.f1 = x1’ x2’ x4
Positive function f1 = x1 x2 x4
Tmin 1 1 0 1
Fmax 1 1 1 0
1 0 1 1
0 1 1 1
The inequalities:
W1 + W2 + W4 > W1 + W2 + W3 => W4 > W2
W1 + W2 + W4 > W1 + W3 + W4 => W2 > W3
W1 + W2 + W4 > W2 + W3 + W4 => W1 > W3
W3 = 0
W1 = W2 = W4 = 1
UL = 3, LL = 2, T = 5/2
x1 x2 x3 x40 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 0
F 0 1 1 11 0 0 01 0 0 11 0 1 0
F 1 0 1 11 1 0 0
Tmin 1 1 0 1F 1 1 1 0T 1 1 1 1
f2=x2x1’x4’
f3=x1x2x3
• Now we can cascade the three threshold gates in any order f1->f2->f3 or f3->f1->f2-> or f2->f3->f1
REALIZE AS A CASCADE OF THRESHOLD GATES
110
1
)(')('
)(
CxBCAxBAC
CxBAS
1CYAS
YxB
110 '' YCCAYAC let
REALIZE AS A CASCADE OF THREE THRESHOLD GATES
1.
Positive function f1=xwz
Tmin = 1 0 1 1
Fmax = 1 1 1 0
1 1 0 1
0 1 1 1
)13,9,7,4,3,0(f
zxwf
wzxf
zwxf
)13,9(3
)7,3(2
)4,0(1
zwxf 1x y z w0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 1
F 1 0 0 01 0 0 11 0 1 0
Tmin 1 0 1 11 1 0 0
F 1 1 0 1F 1 1 1 0T 1 1 1 1
The iequalities
W1+W3+W4 > W1+W2 +W3 => W4 > W2
W1+W3+W4 > W1+W2 +W4 => W4 > W2
W1+W3+W4 > W1+W2 +W3 => W4 > W2
Choose W2 = 0
W1=W3=W4=1
UL=3, LL=2, T=5/2
Now, let the cascade gates be in f1 -> f2 -> f3 ->
To determine the weight for f1:
(-1) (0) (1) (1)
x y z w
The minterms 0 0 0 0 f1 + 0 > 1.5
& both f1 & f2 0 0 1 1 f1 + 2 > 1.5
0 1 0 0 f1 + 2 > 1.5
0 1 1 1 f1 + 2 > 1.5 min weight for f1=2
for minimum weight for f2:
(1) (0) (-1) (1)
x y z w
0 0 1 1 f2 + 0 > 1.5
0 1 1 1 f2 + 0 > 1.5
1 0 0 1 f2 + 2 > 1.5
1 1 0 1 f2 + 2 > 1.5 min weight for f2=2
Part Two
HALF ADDER
Create truth table for half adder
Expand truth table to three inputs. Terms not
found on first table are assigned as don’t care
terms for S.
S=XC’ + YC’
S=(X + Y)C’
2-digit # XY X Y C S 3-digit #XYC0 0 0 0 0 01 0 1 0 1 22 1 0 0 1 43 1 1 1 0 7
3-digit #XYC X Y C S0 0 0 0 01 0 0 1 X2 0 1 0 13 0 1 1 X4 1 0 0 15 1 0 1 X6 1 1 0 X7 1 1 1 0
FULL ADDER
Create truth table for full adder
3-digit #XYZ X Y Z C S
4-digit #XYZC
0 0 0 0 0 0 01 0 0 1 0 1 22 0 1 0 0 1 43 0 1 1 1 0 74 1 0 0 0 1 85 1 0 1 1 0 116 1 1 0 1 0 137 1 1 1 1 1 15
C=XY + YZ + XZ
FULL ADDER
Expand truth table to four inputs. Terms not found on first
table are assigned as don’t care terms for S.
4-digit #XYZC X Y Z C S
0 0 0 0 0 01 0 0 0 1 X2 0 0 1 0 13 0 0 1 1 X4 0 1 0 0 15 0 1 0 1 X6 0 1 1 0 X7 0 1 1 1 08 1 0 0 0 19 1 0 0 1 X10 1 0 1 0 X11 1 0 1 1 012 1 1 0 0 X13 1 1 0 1 014 1 1 1 0 X15 1 1 1 1 1
S = XC’ + YC’ + ZC’ + XYZ S = (X + Y + Z)C’ + XYZ
HALF SUBTRACTOR
Create truth table for half subtractor.
Expand truth table to three inputs. Terms not found D = X’Y
on first table are assigned as don’t care terms for D.
D = XY’ + B
2-digit #XY X Y B D
3-digit #XYB
0 0 0 0 0 01 0 1 1 1 32 1 0 0 1 43 1 1 0 0 6
3-digit #XYB X Y B D
0 0 0 0 01 0 0 1 X2 0 1 0 X3 0 1 1 14 1 0 0 15 1 0 1 X6 1 1 0 07 1 1 1 X
FULL SUBTRACTOR
Create truth table for full subtractor
B = X’Y + X’Z + YZ
3-digit #XYZ X Y Z B D
4-digit #XYZB
0 0 0 0 0 0 01 0 0 1 1 1 32 0 1 0 1 1 53 0 1 1 1 0 74 1 0 0 0 1 85 1 0 1 0 0 106 1 1 0 0 0 127 1 1 1 1 1 15
FULL SUBTRACTOR
Expand truth table to four inputs. Terms not found
on first table are assigned as don’t care terms for D.
D = Z’B + XB + Y’B +XY’Z’
D = (X + Y’ + Z’)B + XY’Z’
4-digit #XYZB X Y Z B D
0 0 0 0 0 01 0 0 0 1 X2 0 0 1 0 X3 0 0 1 1 14 0 1 0 0 X5 0 1 0 1 16 0 1 1 0 X7 0 1 1 1 08 1 0 0 0 19 1 0 0 1 X10 1 0 1 0 011 1 0 1 1 X12 1 1 0 0 013 1 1 0 1 X14 1 1 1 0 X15 1 1 1 1 1
PART THREE
Q. <a> Write down the detailed steps for BDD of the majority function
Solution: f=
Assume: X1=A’B, X2=C, X3=D’E+DF
M(A’B, C, D’E+DF)=X1X2+X1X3+X2X3
)(),,( HGDFEDCBAM
)(),,( HGDFEDCBAM
HGHGHGX
HGHGX
.)(1
)(0
5
4
)()323121().).(313221()()323121( HGXXXXXXHGXXXXXXHGXXXXXX
CX 2
The total result
f= )(),,( HGDFEDCBAM
f var 0 1a A b cb B c dc C h ed C e Ie D f gf E h ig F h ih G I jI G 0 kj H 0 1k H 1 0
Arithmatic cell: BDD for Fi=CoX+PiX’ D=C(B+Fi)
Control cell:
Fi=CoX+PiX’
E=B(C+C’)+Cfi=BC’+D
CFiBE
CFiBCD
ACCAXBC
FiAFiCXBAS
1)1)((
]1)([
0
110 ))(( ACCAXBC
FiAFiCXBAS ]1)([
Implementation: “One-out-of-two” Selector
f=(Vv g)(V’ v h)
E: Check: E=(B+D)(B’+(C+1)(C’+))
=(B+D)(B’+C’+D)
=BC’+D
=BC’+C(B+Fi)
=B+Cfi
D:
Fi:
Co:
S:
• Interconnection:
Recommended