


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Comp 411 Computer Organization Spring 2006
Problem Set # Issued Thursday, 10/11/06; Due Thursday, 10/18/
Homework Information: Some of the problems are probably too time consuming to be done the night before the due date, so plan accordingly. Late homework will not be accepted. Feel free to get help from others, but the work you hand in should be your own.
Problem 1. Mux Madness
During a particularly boring Comp 411 lecture about the universality of NAND and NOR gates, Lee Hart suddenly realizes that multiplexers are also universal. At the close of lecture he awakes and jots the following diagram on the back of his lecture notes:
Help explain Lee’s insight. a) Give binary values for I 0 , I 1 , I 2 , and I 3 which implement the following functions on the two inputs A and B: AND(A,B), OR(A,B), XOR(A,B), NAND(A,B), and NOR(A,B). b) Can every 2-input Boolean function be implemented using Ben’s structure? Explain why or why not.
The next day, in an effort to impress his TA, Lee attends office hours and explains his discovery. He decides to make his point by constructing several standard gates using his structure. Not to be out done, the TA claims that he could build each 2-input gate using only 2 multiplexers. c) Show how to implement an inverter, as well as every 2-input gate using no more than 2- multiplexers to construct each one. d) Explain how every 4-input Boolean function can be implemented with an 8-input mux and a single inverter. e) The TA explains to Lee that no more than 40% of all 4-input Boolean functions can be implemented with only an 8-input mux (i.e. no inverter). He jots down an upper bound on the number of such functions: 3^8 /2^14. Can you explain the TA’s reasoning?
Problem 2. “Go Forth and Multiply” a) Design logic to perform the multiplication of two, 2-bit unsigned integers producing a 4- bit result (Hint: write a truth table for each output bit). Draw a gate-level-circuit diagram. b) Determine the function of the following circuit by writing out and examining its truth table.
c) What aspects of minimization are not considered in a sum-of-products realization? d) Assume that the 2-bit multiplier that you designed in part a) is represented as the following function block:
Use this function block and single-bit full-adders to build a 4-bit multiplier (a multiplier that takes 2, 4-bit inputs and generates an 8-bit result).
e) Design logic to compute the square of a 2-bit unsigned integer. How does this circuit compare to the one you designed in part a)?
Mult
Problem #4. “An Adder’s Bite”
Consider the follow two circuits for adding 3, 4-bit numbers (i.e. W = X + Y + Z):
a) Ignoring the speed of the calculation, do both 3-input adder designs compute the same result? If not, how do they differ? b) Assume a unit delay for each full-adder (i.e. the output will become valid one time unit after all inputs are valid). Which design computes all bits of the sum fastest? Which design computes the first (least-significant) bit fastest? c) Obviously, design #1 uses one more adder than design #2. Explain how design #1 can be modified slightly to use one fewer full-adder. After this change, which design computes all bits of its sum fastest? d) Both designs could be improved by incorporating carry-lookahead logic in place of their carry-propagation chains. Which design would requires less logic to implement carry lookahead? Explain. e) Modify both designs to support the following operations: W = X + Y + Z or W = X – Y – Z, based on the value of a control signal (CTRL).
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
0 Z3 Z2 Z1 Z
X3 Y3 X2 Y2 X1 Y1 X0 Y
W5 W4 W3 W2 W1 W
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
0
0
0
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
A B Co FA Ci S
X3 Y3 Z3 X2 Y2 Z3 X Y1 Z1 X0 Y0 Z
W5 W4 W3 W2 W1 W
0