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 Digital Logic number-representation digital-logic + – HeartBleed asked Feb 4, 2019 HeartBleed 1.3k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Koushik Sinha 2 commented Feb 5, 2019 reply Follow Share 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 votes 3 votes NIKHIL MOLUGU commented Dec 12, 2019 reply Follow Share 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 votes 0 votes Shiva Sagar Rao commented May 28, 2021 reply Follow Share https://gateoverflow.in/302840/gate-cse-2019-question-8 0 votes 0 votes Please log in or register to add a comment.
6 votes 6 votes Its C n+1 Duffer answered Feb 4, 2019 Duffer comment Share Follow See 1 comment See all 1 1 comment reply vupadhayayx86 commented Feb 5, 2019 reply Follow Share Yes even i thought n+1 it was 2 marks or 1 marks? 0 votes 0 votes Please log in or register to add a comment.