implement a system that receives 3 input A, B, C, each variable consisting of k bits, and a flag variable F consisting of 2 bits; and outputs a k bit variable Y based on the following rules. In what follows, A, B, C, and Y are considered to be in 2's complement form with k bits and |X| stands for the absolute value of X.
(a) If F = 00 then the output Y will check if the inputs A, B, C and their sums (or differences) can be represented in 2's complement form with k bits. Namely, Y = 000 . . . 000 if |A|+|B|+|C| ≤ 2 k −1 and Y = 111 . . . 111 otherwise.
(b) If F = 01 then the output Y will be equal to the input with the largest value (in 2's complement form). Namely, if A is larger than B and C then Y will be equal to A. Similarly, if B is largest Y will be equal to B, and if C is largest Y will be equal to C. Ties can be broken arbitrarily.
(c) If F = 10 then the output Y will compare between the values |A| + |B| − |C| and |A + B − C|. Namely Y = 000 . . . 000 if |A| + |B| − |C| ≥ |A + B − C| and Y = 111 . . . 111 otherwise.
(d) If F = 11 then the output Y will be equal to the product of A[2:0] and B[2:0]. Here, A[2:0] and B[2:0] are the 3 least significant bits of A and B respectively (you may assume k ≥ 3). In this case, the values of A[2:0], B[2:0], and Y are considered to be in standard binary form.
Construct a circuit that performs the above functionality. Draw the circuit in an organized and readable manner. Up to 50 points will be reduced for solutions that are unorganized and difficult to understand. It is recommended to present the circuit in a modular manner (see figure below). In your circuits, you may use any component covered in the class lectures.
During a course we learn abour components such as logic gates, mux, decoders, adders, ALU, substractor, comparator, absolute value etc
Recently Asked Questions
- Hi, Are there any past exam papers with solutions for University of Toronto -SCS course 914- (Advance Financial Accounting)?
- These are selected numbers from the financial statements of ZZZZ Best for fiscal years 1985 and 1986: 1985 1986 Sales $1,240,524 $4,845,347 Cost
- I am confused whether true or false for this statement " why a firm’s long-term growth rate in the steady state exceed its discount rate or firm cost of