in Digital Logic edited by
12,203 views
34 votes
34 votes
The $16\text{-bit}\;2's$ complement representation of an integer is $1111 \quad 1111 \quad 1111 \quad 0101;$ its decimal representation is ____________
in Digital Logic edited by
12.2k views

2 Comments

I think this is easier process

0
0
Another way to approach such type of question

we can apply what we have learnt from booths algorithm that is contiguous 1’s can be written as

example ;-

11111 can be written as 2^6 – 2^0 = 64-1 = 63 so we can apply this concept here

1111111111110101 given number

 

we will divide into three part

(1) (11111111111) (0101)

 

1 → (-2^15)

“11111111111” this block of one can be written as → (2^15-2^4)

“0101” →  this decimal is (5)

so finally we will add all up

-2^15 + 2^15 – 2^4 + 5 = -16 +5 = -11 (note: -2^15 + 2^15  this two became zero)
1
1

9 Answers

45 votes
45 votes
Best answer
$1111 \; 1111\; 1111\; 0101$

$2's$ complement of $1111 \; 1111\; 1111\; 0101 = 0000 \; 0000\; 0000\; 1011 =+11$

$2's$ complement of $-11 = +11,$ in $2's$ complement representation

$2's$ complement of $+11 = -11,$ in $2's$ complement representation

So $-11$ it should be.
edited by

4 Comments

it can also solve by using booth algorithm.
0
0

@Praveen Saini

in 2's C representation ..we can ignore leading 1's till first 1 ..

so it will be 10101 shortcut to find decimal value of number in 2's C representation is

-16   8   4    2    1 

  1    0    1    0    1  ==> -16 +(4+1) = -11

is this right to use sir ?

9
9
calling it a ‘shortcut’ would be an understatement.

It is the very essence of sign extension.
2
2
37 votes
37 votes

Answer $= -11$.

for $2's$ complement  1 111 1111 1111 0101  $→$$2′s$ complement$→$$2′s$ complement  $1$ $000$  $0000$  $0000$  $1011$

1bit$^{st}$ is same not involved in $2's$ complement same with $1's$ complement. since msb bit for sign.

Take one's complement and add $1$ we get $11$, and as it is negative number we get answer as $-11$.

Reference: http://www.electronics-tutorials.ws/binary/signed-binary-numbers.html.

edited by

4 Comments

@Hira Thakur How you are applying booths algo here Please explain
0
0
i am nt getting ur solution ...
0
0

Another way-
In $2's \ complement - 11111..\color{RED}10101$ represents the same number as $10101.$
$\Rightarrow -2^4 + 2^2+2^0 =-16+4+1=-11 $

6
6
14 votes
14 votes

   1111111111110101  -> ignore all 1's, except one 1 from left side(because they have no effect on final decimal value)

=  10101

=  (-24)*1 + (23)*0 + (22)*1 + (21)*0 + (20)*1  

= -16 + 4 + 1

= -11

by
2 votes
2 votes
Procedure:

Consider the power place values ofthe number from right to left is 0,1,2,3,4,5........ so on

Calculate the place value of first 1 of the number from left where contineous 1s are there to the left of it till end(Let called the place i).

Then do this formula: -(2^i)+(sum of all 2^j)   Here j is from i-1  to 0

Here Number is:1111111111110101

  -(2^4) +2^2+2^0=-16+4+1=-11
Answer:

Related questions