Assembly Homework #1 Average: 83.6234 Standard deviation: 21.007 Max: 100 Min: 20.
-
Upload
harriet-charlotte-russell -
Category
Documents
-
view
212 -
download
0
Transcript of Assembly Homework #1 Average: 83.6234 Standard deviation: 21.007 Max: 100 Min: 20.
Assembly Homework #1
• Average: 83.6234• Standard deviation: 21.007• Max: 100• Min: 20
Some notes
• Write down your name and ID• Use A4 papers• Use standard symbols• Define your components• Do not mix circuits and logic gates• Do not plagiarize
Problem #5
Idea
• X = X3X2X1X0, Y = Y3Y2Y1Y0
• X = Y: (X3=Y3)(X2=Y2)(X1=Y1)(X0=Y0)
• X > Y: (X3>Y3) + (X3=Y3)(X2>Y2) + (X3=Y3)(X2=Y2) (X1>Y1) + (X3=Y3)(X2=Y2)(X1=Y1)(X0>Y0)
x y x > y x = y x < y
0 0 0 1 0
0 1 0 0 1
1 0 1 0 0
1 1 0 1 0
x > y: xy’x = y: x’y’ + xyx < y: x’y
1-bit comparator
X > Y
X = Y
X < Y
Other solutions
• More then 2 inputs for 1-bit comparator (control signal, previous results, etc)
• Using adder/substractor (note: 4-bit is not enough!)
Grading policy
• 5 points per each components (1-bit comparator, X>Y, X=Y, X<Y)
• 15–20 points: correct with minor mistakes• 10-15 points: correct with many minor
mistakes• 5-10 points: (maybe) correct major mistakes• 0-5 points: I cannot understand it…
Problem #6
Z2Z1Z0 = X2X1X0 + Y2Y1Y0
X0 X1 X2
Y0 Y1 Y2 Z0
Z1
Z2
cin
cout
3-bit adder
X2 X1 X0 Y2 Y1 Y0
X0 ×Y0
X1 ×Y0
X0 ×Y2
X2 ×Y0
X1 ×Y2
X2 ×Y2
X0 ×Y1
X1 ×Y1
X2 ×Y1
3-bit adder
3-bit adder
Z1
Z0
Z2 Z3
Z4
Z5
0
0
Solution 1
half adder
x
y
s
c
full adder
x
cin
s
cout
y
full adder
full adder
half adder Z2
half adder Z3
full adder Z4
half adder
Z1
X2 X1 X0 Y2 Y1 Y0
Z5
Z0
X0 ×Y0
X0 ×Y1
X1 ×Y0
X0 ×Y2
X1 ×Y1
X2 ×Y0
X2 ×Y1
X1 ×Y2
X2 ×Y2
Solution 2
Grading policy
• No answer (-20)• No circuit drawing (-10)• Wrong circuits (-1~-5)• New component without
implementation (-1~-5)– 3-to-1 multiplier (X[3..1] × Y)– Multiple-input adder (X+Y+Z)
• Other error(-1~-5)
half adder
x2
x1
full adderx3
s
c
s
cout
cin
(last digit of your ID) % 5ex: B78902011 => 1%5 = 1
0 1 2 3 4