in Digital Logic
1,333 views
0 votes
0 votes
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
in Digital Logic
1.3k views

3 Comments

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.
3
3
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.
0
0

1 Answer

6 votes
6 votes
Its C n+1

1 comment

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

Related questions