Question:

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\)?

Show Hint

When representing negative numbers in 2's complement, always extend the most significant bit (MSB) to the left when increasing the bit size. This ensures the number stays correctly represented.
Updated On: Apr 4, 2025
  • \(1000 \, 1010\) in 8-bits
  • \(1111 \, 1010\) in 8-bits
  • \(1000 \, 0000 \, 0000 \, 1010\) in 16-bits
  • \(1111 \, 1111 \, 1111 \, 1010\) in 16-bits
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B, D

Solution and Explanation

The 2’s complement representation of a negative number can be found by inverting the bits of the positive value and then adding 1.

For \( -6 \) in 4-bit 2’s complement:
1. The binary representation of \( 6 \) is \( 0110 \).
2. Invert the bits: \( 1001 \).
3. Add 1: \( 1010 \).

Now, let's consider the extended bit sizes:
- In 8-bits: The correct 2’s complement representation of \( -6 \) would be \( 1111 \, 1010 \). So, Option (B) is correct.
- In 16-bits: The correct 2’s complement representation of \( -6 \) would be \( 1111 \, 1111 \, 1111 \, 1010 \). So, Option (D) is correct.

Thus, the correct answers are \( \boxed{B} \) \& \( \boxed{D} \).
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions