Considering 2's complement representation for negative numbers, what is the…

2018

Considering 2's complement representation for negative numbers, what is the decimal equivalent of an 8-bit register content 10000000?

Answer: D. -128In an n-bit two's complement representation, the most significant bit (MSB) carries a negative positional weight of -27 for 8 bits (in general -2(n-1)), while…

  1. A.

    -0

  2. B.

    +0

  3. C.

    +128

  4. D.

    -128

Attempted by 375 students.

Show answer & explanation

Correct answer: D

In an n-bit two's complement representation, the most significant bit (MSB) carries a negative positional weight of -27 for 8 bits (in general -2(n-1)), while every other bit keeps its usual positive weight 2k. Adding up all the weighted bits directly gives the signed decimal value — no separate sign symbol is needed.

  1. For an 8-bit register, the bit weights from the most significant bit (leftmost) to the least significant bit (rightmost) are -27, 26, 25, 24, 23, 22, 21, 20, i.e., -128, 64, 32, 16, 8, 4, 2, 1.

  2. In the given pattern 10000000, only the most significant bit is 1; every other bit is 0.

  3. Multiplying each bit by its weight and summing: (1 × -128) + (0 × 64) + (0 × 32) + (0 × 16) + (0 × 8) + (0 × 4) + (0 × 2) + (0 × 1) = -128.

Cross-check using the invert-and-add-one rule for negative numbers: inverting every bit of 10000000 gives 01111111 (= 127 in unsigned binary); adding 1 gives 10000000 (= 128 in unsigned binary). Since the sign bit is 1, the decimal value is -128 — the same result as the direct weighted-sum method.

Explore the full course: Hpsc Pgt Computer Science

Loading lesson…