1. If we had two 4-bit signed 2's complement numbers, X--4 and Y-6 and we wanted to compare them, we might calculate X-Y (a) Show that calculation (b) Explain how the result tells us that Y>IX...
1. If we had two 4-bit signed 2's complement numbers, X--4 and Y-6 and we wanted to compare them, we might calculate X-Y (a) Show that calculation (b) Explain how the result tells us that Y>IX (c) Now show the calculation for Y. X (d) Explain how this also shows us that Y>X 2. We talked about an ALU that takes two 4-bit inputs, A and B, and then generates a 4-bit result, S, based on a 2-bit command, F1FO. (In the lecture slides these are called C1C0, but I'm changing the name to etc.) The meaning of the 2-bit command we discussed is * if F1F0-00 then the ALU computes the sum (S-A+B) avoid confusion with the carry signals that we often label as CO, C1, if FlFO-01 then it computes the difference (S-A-B) if F1F0-11 then it generates a true/false indication of whether A<B (S-0001 for true, 0000 for false) We didn't use a command encoding of 10. So let's say we want to add that encoding and generate the "true" indication of 0001 İfAB, and the “false" indication of 0000 if A is not greater than B. In order to do this, we'll need to make some changes to what we discussed in lecture (a) We have a control signal called Subtract that, when asserted causes operand B to be inverted and causes a carry-in of 1 to be fed into the ripple carry adder. In lecture we said this signal was equivalent to C0, but that's not sufficient now. What does the logic for this Subtract signal need to be now? (b) Assuming we have correctly controlled our ripple carry adder to perform a subtraction, the sign bit of the result plays a role in determining the comparison result. If we're trying to determine if A is greater than B, there are two reasons why we can't just look at the sign bit to see if it's 0. What are those two reasons?
1. If we had two 4-bit signed 2's complement numbers, X--4 and Y-6 and we wanted to compare them, we might calculate X-Y (a) Show that calculation (b) Explain how the result tells us that Y>IX (c) Now show the calculation for Y. X (d) Explain how this also shows us that Y>X 2. We talked about an ALU that takes two 4-bit inputs, A and B, and then generates a 4-bit result, S, based on a 2-bit command, F1FO. (In the lecture slides these are called C1C0, but I'm changing the name to etc.) The meaning of the 2-bit command we discussed is * if F1F0-00 then the ALU computes the sum (S-A+B) avoid confusion with the carry signals that we often label as CO, C1, if FlFO-01 then it computes the difference (S-A-B) if F1F0-11 then it generates a true/false indication of whether A