Question
The smallest integer that can be represented by an 8-bit number in 2’s complement form is
Official answer and solution
- Official answer
- B
- From
- Official GATE 2013 answer key
Solution
Recall the formula for the range of signed integers represented in n-bit 2's complement form.
For an -bit binary number represented in 2's complement form, the representable range is:
For bits:
- Minimum representable integer (binary:
10000000). - Maximum representable integer (binary:
01111111).
Therefore, the smallest integer is .
Final answer
Option (B)
Common trap
Confusing 2's complement range () with 1's complement or sign-magnitude range ().
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2013 Computer Science and Information Technology (CS)
- Question
- 4 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.