The Gateway to Computer Science Excellence

+10 votes

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

- $1111 \: 1111 \: 0001 \: 1100$
- $0000 \: 0000 \: 1110 \: 0100$
- $1111 \: 1111 \: 1110 \: 0100$
- $1000 \: 0000 \: 1110 \: 0100$

+23 votes

Best answer

+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.

52,345 questions

60,489 answers

201,830 comments

95,297 users