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. 11110001 — ConceptFor 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…
- A.
11110001
- B.
11110000
- C.
10001111
- 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
Use 8 bits, as shown by the answer choices. The positive magnitude 15 is 00001111 in binary.
Invert each bit of 00001111 to obtain 11110000.
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.