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

- Please refer to the attachment to answer this question. This question was created from AFR191qz1FA14(2).

- what is the similarities and differences between Keynesian and classical economics?

- Could someone help me with this bounded-buffer problem? I'm not that familiar with Linux and can't solve it. Completed files would be really appreciated,