55 views

https://gateoverflow.in/1413/gate2013-4

In the first question if due to the range of 2's complement number the answer is -128

https://gateoverflow.in/39649/gate2016-1-07

Why the answer is -11 here? Here also the number is -ve and answer should be -12 due to the range..

| 55 views
0
According to me the first number is to be represented in 2's complement form. so we considered 2's complement range and hence the answer is -128.
In case of 2nd number the number is to be represented in decimal form, which doesnt have any relation with 2's complement range. Hence the answer is simply -11.
Correct me if i am wrong ..
+1

In case of 2nd number the number is to be represented in decimal form,

Number represented in 2's complement form and they want equivalent decimal number

1111 1111 1111 0101 in 2's complement representation form ===> 1 0101 in 2's complement representation form ( by ignoring leading 1's expect one )

1 0101 in 2's complement representation form = -1*24 + 1*22 + 1*20 . = -16 + 4 + 1 = -16+5 = -11