What is the 8-bit binary representation of (-15)10 when the two’s-complement…

2010

What is the 8-bit binary representation of (-15)10 when the two’s-complement system is used?

Answer: A. 11110001ConceptFor an n-bit two’s-complement representation, a negative integer -x is encoded as 2n - x. Equivalently, write the positive magnitude in n bits, invert…

  1. A.

    11110001

  2. B.

    11110000

  3. C.

    10001111

  4. D.

    None of these

Attempted by 21 students.

Show answer & explanation

Correct answer: A

Concept

For an n-bit two’s-complement representation, a negative integer -x is encoded as 2n - x.

Equivalently, write the positive magnitude in n bits, invert every bit, and add 1.

Application

  1. Use 8 bits, as shown by the answer choices. The positive magnitude 15 is 00001111 in binary.

  2. Invert each bit of 00001111 to obtain 11110000.

  3. Add 1: 11110000 + 1 = 11110001.

Cross-check

The unsigned value of 11110001 is 241. In 8-bit two’s complement, 241 - 256 = -15, so the representation decodes back to the given integer.

Therefore, the 8-bit two’s-complement representation of (-15)10 is 11110001.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…