Computer AwarenessHardIBPS SO IT Officer

The value −6 is 1010 in 4-bit two's complement. When it is sign-extended to 8 bits, the result is:

  1. A. 00001010
  2. B. 11111010
  3. C. 10001010
  4. D. 11110110

Correct answer: B. 11111010

Sign extension copies the sign bit into every new high position: 1111 1010, which is still −6. Padding with zeros would give +10, and 11110110 is −10.

हिंदी में

मान −6, 4-बिट टू’ज़ कॉम्प्लिमेंट में 1010 है। इसे 8 बिट तक साइन-एक्सटेंड करने पर परिणाम है:

  1. A. 00001010
  2. B. 11111010
  3. C. 10001010
  4. D. 11110110

उत्तर: B. साइन एक्सटेंशन साइन बिट को प्रत्येक नए उच्च स्थान में कॉपी करता है: 1111 1010, जो अब भी −6 है। शून्य भरने पर +10 मिलता, और 11110110 का मान −10 है।

More Computer Awareness questions

Exams that ask this topic