Академический Документы
Профессиональный Документы
Культура Документы
(B2A7)16
Answer:
Radix complement: (4D59)16
(b) (10 points) Add the following 6-digit signed binary numbers, using 1’s complement
representation on the left, then using two’s complement on the right. You must show all
your work, including all arithmetic operations and carries using the space provided.
Indicate whether overflow occurred, and how you determined this condition.
Answer:
(5 points) (5 points)
1’s Complement 2’s Complement
0 0 1 1 1 0 1 0 1 1 1 1 0
1 0 0 0 0 1 1 0 0 1 1 1
+ 0 1 0 1 1 1 + 1 0 1 0 1 1
1 1 1 0 0 0 0 1 0 0 1 0
____This circuit counts the number of “1” bits in register R, and stores the
(b) (15 points) Provide a one-hot implementation of this ASM in the space to the right.
Minimize your implementation wherever possible.
In (8b)
“0”
RShift
R (8b shift reg) Load
4b Parallel Adder Cin
AllZero
S (4b register) Clear
Init
G
DQ
0 1
G
Clear, Load
AllZero
S? 0, R? In DQ
RShift
AddShift
S? S + R0
R? sr R
Done
0 4b
AllZero
Done =1
AllZero
S (4b register) Clear
Cin T Q T Q T Q T Q
~Q ~Q ~Q ~Q
reset reset reset reset
Clear
CLK
(a) (5 points) Assume you are using pipeline flip- flops in your design. What is minimum
clock period of your design?
(b) (5 points) How many levels of NAND gates can you have in other combinational paths in
your flip-flop-based design without increasing the minimum clock period?
(c) (5 points) Assume you are using master-slave pipeline latches instead of flip- flops in
your design. What is the minimum clock period of your design?
(d) (5 points) How many levels of NAND gates can you have in other combinational paths in
your latch-based design without increasing the minimum clock period?
S0
Full Adder
X
Ai Sum Fi
S1 Y
Cout Ci+1
Ci Cin
Bi
S1
S0
The schematic shown above is an ALU bit slice which can perform both arithmetic and logic
operations by choosing appropriate control signals C0 , S0 and S1 where C0 is a Ci for the least
significant bit. . Let A = An−1 …A1 A0 and B = Bn−1 …B1 B0 are two operands and F =
Fn−1 …F1F0 is the output. Complete the function table below for output F. For each function,
clearly indicate whether the function is an arithmetic operation (A) or a logical operation (L).
Answer: When you analyze the ALU, you will notice that above ALU is applying Function
X(S1 , S0 , Ai, Bi) = S 0 ⋅ Ai + S 0 ⋅ Ai to Input X and Y(S1 , S0 , Ai, Bi) = S1 ⋅ Bi + S1 ⋅ Bi to Input Y
of F.A. If you create a truth table of four input variables, (S1 , S0 , Ai, Bi), and two output
functions X(S1 , S0 , Ai, Bi) and Y(S1 , S0 , Ai, Bi), then you will see that we are applying Ai Bi ,
Ai Bi , Ai Bi , and Ai Bi to input X Y for S1 S0 equal to 00, 01, 10, and 11, respectively. For
Cin of F.A, we apply 0 (logic operation) when S1 S0 equal to 00, and Ci for all other values of
S1 S0 (arithmetic operation for 01, 10, and 11).
S1 S0 C0 = 0 C0 = 1
(L)
0 0 Unused -Do not complete
Ai ⊕ Bi
(A) (A)
0 1 Ai + Bi =Ai- Bi in 1’s Ai + Bi +1=Ai- Bi in 2’s
complement arithmetic complement arithmetic
(A) (A)
1 0 Ai + Bi =Bi- Ai in 1’s Ai + Bi +1=Bi- Ai in 2’s
complement arithmetic complement arithmetic
F G H
(a) (6 points) Find the sum of product expressions for Function F, G and H.
Answer:
F(A, B, C) = B ⋅ C + B ⋅ C + A ⋅ B ⋅ C
G(A, B, C) = A ⋅ B + A ⋅ C
H(A, B, C) = A ⋅ C + B ⋅ C + A ⋅ B ⋅ C
A\BC 00 01 11 10
1 1
0 1 0
1
1 1 0 0
There are three pairs of hazards for ABC={000? 001}, {000? 010}, {100? 110}
(c) (4 points) Find two different sets of product terms that can be added to Function F(A, B,
C) to eliminate all SICS-1 logic hazard(s). Each set should only contain product term(s)
that contributes to eliminate SICS-1 logic hazard(s).
Set 1 = { A⋅B, C }
Set 2 = { A ⋅ B , A⋅ C , A⋅ C }
(d) ( 4 points) Modify the PLA in the previous page to eliminate the SICS-1 logic hazard of
Function F(A,B,C) using one of the set you have found in Part (c). You may use one or
more unprogrammed AND gates, but you are to minimize programming of unused AND
gates whenever possible.
Even though Set 1 has fewer number of terms, Set 1 will require adding a new term to
PLA which implies we need to program one of unused AND gate. However upon a close
inspection, you can see all product terms in Set 2 are already programmed and being used
by other functions. If we use Set 2, there is NO need to use unprogrammed AND gates.
Thus we choose Set 2 to minimize unnecessary logics.
JK Flip-Flop SR Flip-Flop
Q(t) Q(t+1) J K Q(t) Q(t+1) S R
0 0 0 X 0 0 0 X
0 1 1 X 0 1 1 0
1 0 X 1 1 0 0 1
1 1 X 0 1 1 X 0
D Flip-Flop T Flip-Flop
Q(t) Q(t+1) D Q(t) Q(t+1) T
0 0 0 0 0 0
0 1 1 0 1 1
1 0 0 1 0 1
1 1 1 1 1 0
1. X + 0 = X 2. X⋅ 1 = X
3. X + 1 = 1 4. X⋅ 0 = 0
5. X + X = X 6. X ⋅ X = X
7. X + X =1 8. X⋅ X = 0
9. X =X
10. X + Y = Y + X 11. X ⋅ Y = Y ⋅ X Commutative Law
12. X + (Y + Z) = (X + Y) + Z 13. X (YZ) = (XY) Z Associative Law
14. X(Y + Z) = XY + XZ 15. X + YZ = (X + Y)(X + Z) Distributive Law
16. X + Y = X ⋅Y 17. X ⋅ Y =X +Y DeMorgan’s Law
18. X + XY = X 19. X + XY = X + Y
20. XY + X Y = X 21. XY + X Z + YZ = XY + X Z
22. ( X + Y )( X + Y ) = X ⋅ Y + X ⋅ Y 23. ( X + Y )( X + Y ) = X
Exclusive-Or Identities
24. X ⊕ 0 = X 25. X ⊕ 1 = X
26. X ⊕ X = 0 27. X ⊕ X = 1
28. X ⊕ Y = X ⊕ Y 29. X ⊕ Y = X ⊕ Y
30. X ⊕ Y = Y ⊕ X
31. (X ⊕ Y ) ⊕ Y = X ⊕ (Y ⊕ Z) = X ⊕ Y ⊕ ZX