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$

edited | 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

yes answer 1111 1111 1110 0100

$(+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).

edited

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

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$