In: Computer Science
1. Given the 8 bit hex number 0x5E, what smallest hex value would you have to add to set the Overflow flag?
2. Given the 8 bit hex number 0x6E, what smallest hex value would you have to add to set the Carry Flag?
Please give detailed explanation on how to solve.
(Sign flag) SF
It is set if the most significant bit of the outcome, which is the sign bit of a signed integer. (0 shows a positive value and 1 shows a negative value.)
OF (Overflow flag)
It is set if the integer result is too big a positive number or too small a negative number to fit in the destination operand (excluding the sign-bit); otherwise cleared. This flag shows an overflow condition for the arithmetic signed-integer (complement of two).