Computer Sciences > GATE 2025 SET-1 > Number Representation
The number -6 can be represented as 1010 in 4-bit 2's complement representation. Which of the following is/are CORRECT 2's complement representation(s) of -6?
A
1000 1010 in 8-bits
B
1111 1010 in 8-bits
C
1000 0000 0000 1010 in 16-bits
D
1111 1111 1111 1010 in 16-bits

Correct : b,d

Correct Answer:
b and d (Multiple Select Question)

Explanation:
1. Concept of Sign Extension: In 2's complement representation, when you want to extend a signed integer from a smaller number of bits to a larger number of bits (e.g., from 4 bits to 8 bits or 16 bits), you perform an operation called sign extension.
• To do this, you simply look at the most significant bit (MSB), which is the leftmost sign bit.
• You replicate (copy) that sign bit into all the new higher-order positions to fill the extra space.

2. Analyze the Original Value:
• The original 4-bit representation of -6 is 1010.
• The sign bit (MSB) is 1 (indicating a negative value).

3. Convert to 8-bits:
• We need to add 4 extra bits to the left.
• Since the sign bit is 1, we extend it by adding four 1s: 1111.
• Combining them gives: 1111 1010.
• Therefore, Statement (b) is Correct and Statement (a) is Incorrect.

4. Convert to 16-bits:
• We need to add 12 extra bits to the left of the original 4 bits.
• Since the sign bit is 1, we copy it 12 times: 1111 1111 1111.
• Combining them gives: 1111 1111 1111 1010.
• Therefore, Statement (d) is Correct and Statement (c) is Incorrect.

Similar Questions

Consider a 4 bit Johnson counter with an initial value of 0000. The counting sequence of this counter is
#72 MCQ
Given the following binary number in 32 bit (single precision) IEEE-754 format: 00111110011011010000000000000000 The decimal value closest to this floating-po...
#163 MCQ
The representation of the value of a 16-bit unsigned integer X in a hexadecimal number system is BCA9. The representation of the value of X in octal number syst...
#182 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......