Consider a system that uses bits for representing signed integers in 's complement format. In this system, two integers and are represented as = and =. Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?
View worked solution
Answer: B
In a -bit 's complement representation, the range of representable signed integers is:
First, let's determine the decimal values of the given binary representations and :
- : Since the MSB (sign bit) is , it is a positive number.
- : Since the MSB is , it is a negative number.
Now, let's evaluate each option to see if the result falls outside the representable range :
- : Since , no overflow or underflow occurs.
- : Since , this operation results in an arithmetic overflow (positive overflow).
- : Since , no overflow or underflow occurs.
- : Since , no overflow or underflow occurs.
Thus, only the operation results in an arithmetic overflow.
Free practice · Your answers on this page are not saved.
