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:
- A. 00001010
- B. 11111010
- C. 10001010
- 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 बिट तक साइन-एक्सटेंड करने पर परिणाम है:
- A. 00001010
- B. 11111010
- C. 10001010
- D. 11110110
उत्तर: B. साइन एक्सटेंशन साइन बिट को प्रत्येक नए उच्च स्थान में कॉपी करता है: 1111 1010, जो अब भी −6 है। शून्य भरने पर +10 मिलता, और 11110110 का मान −10 है।
More Computer Awareness questions
- The 8-bit two's-complement value 11101000 (−24) is shifted right by two places using an ARITHMETIC shift. What is the result?
- When two n-bit two's-complement numbers are added, overflow has occurred exactly when:
- Rotary shaft encoders and Karnaugh-map labels use Gray code mainly because:
- Which code is self-complementing, so that inverting every bit of a digit's code gives the code of its 9's complement?
- The hexadecimal number 3FA is written in binary without leading zeros. How many bits does it have?
- The full contents of a 64-bit register are written out once in hexadecimal and once in octal. At most how many digits does each form need?