The Gateway to Computer Science Excellence
0 votes
44 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..

in Digital Logic by Active (2.4k points) | 44 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

Please log in or register to answer this question.

Related questions

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
195,439 comments
100,696 users