13. (5 points) Given only the following logic components: - One 4-bit adder (this is not full adder) - One invertor gate Design and draw a circuit to do: S={A+3,A+5,? if M=0 if M=1? Where A is a 4-bit binary number ( A3 A2 A1 A0 ), S is a 4-bit binary number (S3 S2 S1 S0), and M is a single bit. Show the details of your solution to get the full mark.
12. (10 points) Design a 4-bit arithmetic combinational circuit that performs the following operations: * Both A and B are 4-bit binary unsigned numbers (A3? A2? A1? A0?) and (B3? B2? B1? B0?) * M1??,M0?? are the control inputs to the arithmetic unit, based on the values of M1? and M0?? the arithmetic unit performs a specific operation. * S is the 4-bit output of the arithmetic unit (S3? S2? S1? S0?). * B?8 is the result of performing integer multiplication of the 4-bit number B by 8 (i.e., multiplying B by 2 three times). * A/4 is the result of performing integer division of the 4-bit number A by 4 (i.e., dividing A by 2 twice). * In this question you are required to design the combinational logic circuit inside the arithmetic unit using the minimum number of the following components: invertors, 4-bit Comparator, 4-bit adders, and 4:1 Multiplexers. You are not allowed to use any other logic components. * use 2's complement arithmetic within the design of your circuit once needed. * Clearly mark the pins of any component you use by identifying its inputs, outputs, and controls, and explain your solution (No credit without fully explaining the circuit). * Hint: multiplication by 2 and division by 2 can be performed by shifting left and shifting right, respectively.