305 views

1 Answer

4 votes
4 votes

NOTE : TO CALCULATE THE 2’S COMPLEMENT OF A GIVEN NUMBER, FIRST WE CALCULATE 1’S

COMPLEMENT BY REPLACING 0 BY 1 & 1 BY 0 IN GIVEN NUMBER AND THEN ADD 1 TO IT.

 

Given number in 2’s complement : 101010101.0101

 

NOTE : IF MSB IN 2’S COMPLEMENT IS 1, THIS MEANS NUMBER IS NEGATIVE.

 

Subtract 1 from given number, we will get the 1’s complement : 101010101.0100

Now, Replace 0 by 1 & 1 by 0 to get the original number : 010101010.1011

 

Now, simply convert this value in decimal. We get : 

 –  (128 + 32 + 8 + 2 + 0.5 + 0.125 + 0.0625) = – 170.6875 

 

Option B, is Correct Answer.

Given Solution is Correct.

edited by

Related questions

0 votes
0 votes
1 answer
3
Roy12 asked Jun 7, 2022
490 views
I want to understand why the statement “I am lying” is a liars paradox as I unable to to toggle between the truth values for this statement. Thanks in advance.