The Gateway to Computer Science Excellence
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 by Junior (815 points) | 530 views
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.

1 Answer

+6 votes
Its C n+1
by (291 points)
Yes even i thought n+1 it was 2 marks or 1 marks?
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,492 answers
100,700 users