Question

The smallest integer that can be represented by an 8-bit number in 2’s complement form is

Choose one option
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 nn-bit binary number represented in 2's complement form, the representable range is:

[−2n−1,2n−1−1][-2^{n-1}, 2^{n-1} - 1]

For n=8n = 8 bits:

  • Minimum representable integer =−28−1=−27=−128= -2^{8-1} = -2^7 = -128 (binary: 10000000).
  • Maximum representable integer =28−1−1=27−1=127= 2^{8-1} - 1 = 2^7 - 1 = 127 (binary: 01111111).

Therefore, the smallest integer is −128-128.

Final answer

Option (B)

Common trap

Confusing 2's complement range (−128-128) with 1's complement or sign-magnitude range (−127-127).

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.