What is the two's complement value of the binary byte 11110000 interpreted as a signed 8-bit integer?

Answer and explanation

Correct answer: B. -16

  1. Step 1: The leading bit is 1, indicating a negative signed integer.
  2. Step 2: Compute its magnitude by inverting bits and adding 1: `11110000` inverted is `00001111`. Adding 1 yields `00010000` (). Thus, the signed value is .
Answer
-16.
Why not the others: +240 is the unsigned decimal interpretation; -240 and -112 miscalculate the two's complement magnitude.

Practise more Computer Systems, Networks and Cybersecurity.

Free questions with an explanation for every one, and full timed EmSAT Achieve (UAE) mock tests.

What is the two's complement value of
 | EmSAT Achieve (UAE)