1. Engineering
  2. Computer Science
  3. x8664 can anyone help me the question thanks fo your...

Question: x8664 can anyone help me the question thanks fo your...

Question details

(X86-64) Can anyone help me the question, thanks fo your help. I can get the result but i'm not sure they are correct2. [5 marks] Overflow Rules (a) [2 marks] Let a and ó be two numbers in the range [0, 2n-1j, i.e., they each have a valid representation in n-bit unsigned binary. To subtract b from a is equivalent to adding -b to a, where -b is represented by 2n - b. Overflow occurs only when a < b. Prove [mathematically] that a< b if and only if the carry out of the MSB is 0 (b) [1 mark] Let x and y be two numbers encoded in n-bit 2s complement, such that x < 0 and y > 0. Clearly, the sum x+y cannot generate an overflow because the magnitude of the result is moving closer to 0 Writing the binary equivalent of x with an MSB of 1 and y with an MSB of 0, there are two cases to consider: t: Either (Case 1) the carry in to the MSB equals 0, or (Case 2) the carry in to the MSB equals 1. Show that the overflow rule holds in either case, i.e., that the carry in equals the carry out. (c) [2 marks Continuing with the same notation in part (b), there are 4 more cases to consider: where x and y are both negative or both positive, combined with whether or not the carry in to the MSB equals 0 or 1. Prove that the overflow rule holds in all 4 cases, i.e., that the carry in equals the carry out if and only if overflow did not occur

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution