The Gateway to Computer Science Excellence
+10 votes
3.4k views

In $16$-bit $2$’s complement representation, the decimal number $-28$ is:

  1. $1111 \: 1111 \: 0001 \: 1100$
  2. $0000 \: 0000 \: 1110 \: 0100$
  3. $1111 \: 1111 \: 1110 \: 0100$
  4. $1000 \: 0000 \: 1110 \: 0100$
in Digital Logic by
edited by | 3.4k views
0
1 I think
+2
I think the correct answer was

1111 1111 1110 0100 (This was in the option)
0
I think this question was asked for 1 mark
+2

@Nandkishor3939 

yes answer 1111 1111 1110 0100 

3 Answers

+23 votes
Best answer

$(+28)_{10} = (0000$ $0000$ $0001 1100)_2$
$-28$ is nothing but $2s$ complement of $+28$.

So, $2s$ complement of $(0000$ $0000$ $0001$ $1100)_2$ is $(1111$ $1111$ $1110$ $0100)_2$

$(-28)_{10} = (1111$ $1111$ $1110$ $0100)_2$. Answer is (C).

by
edited by
+6 votes

2's complement and 2's complement representation are different.

In 2's complement representation, positive no is represented as they are and neg no is represented in 2's complement form.

28 in binary = 11100, expanded to 16 bits = 0000 0000 0001 1100

1's complement of this binary no = 1111 1111 1110 0011

Add 1 to get 2's complement =       1111 1111 1110 0100

Ans should be option C.

https://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html

by
+5 votes
Clearly option $C$.

Ignoring the sign bit extension option $C$ reduces to $100100$

Now calculate the weighted sum to convert it into decimal $= (-2^{5} + 2^{2}) = (-32 + 4) = -28$
by
edited by
Answer:

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
52,345 questions
60,489 answers
201,830 comments
95,297 users