Question
In 16-bit 2's complement representation, the decimal number is:
Official answer and solution
- Official answer
- C
- From
- Official GATE 2019 answer key
Solution
Convert the decimal number to binary and compute its 16-bit two's complement representation.
First, write the binary representation of in 16 bits:
Next, compute the 1's complement by flipping all bits:
Finally, add 1 to obtain the 2's complement representation:
Final answer
C
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2019 Computer Science and Information Technology (CS)
- Question
- 14 of 65, printed as CS Q.4
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.