600 views
Let Z = X – Y, X, Y, Z are signed magnitude numbers and X, Y are represented in n-bit numbers. To avoid overflow minimum number of bits would require for Z is _________
(a) n-bit
(b) n + 2 bits
(c) n + 1 bits
(d) (n – 1) bits
| 600 views
+3
It is asking about sign magnitude number. n-1 bit is used for representation and most significant bit used for sign bit. Now When overflow occur ? it is occured when both have sign bit same. So , here we can use sign bit as overflow avoidance bit as sign bit is already identified from the input . As they are asking about minimum,  N bits are sufficient to avoid overflow. option A is correct.
0
No, its like overflow occurs when sign bits both are 1 and the output signbit is 0 or both 0 and output is 1.

So n bit plus n bit can result at max in n+1 bits. So the msb will be signbit which is n+1 th bit in Z.

If n bits were used then when 2 negative numbers are added the output is shown as positive which is wrong so n+1 bits.

Its C n+1
0
Yes even i thought n+1 it was 2 marks or 1 marks?