Machine-translated by Google. Questions are authored in English.
Top

Discussion

For a 'n' bit number, the maximum positive number which can be represented in 1's complement representation is :

  • A.\(2^{n}\)
  • B.\(2^{n+1} - 1\)
  • C.\(2^{n-1} - 1\)
  • D.\(2^{n-1}\)

Answer: C

The maximum positive number is \(2^{n-1} - 1\).

In 1's complement the most significant bit is the sign bit, 0 for positive, so only n - 1 bits remain for the magnitude. The largest positive value is a 0 followed by n - 1 ones:

\[ 0\,111\ldots1 = 2^{n-1} - 1 \]

For 8 bits that is 01111111 = 127. The range is \(-(2^{n-1}-1)\) to \(+(2^{n-1}-1)\), with two zeros. \(2^{n}\) and \(2^{n+1} - 1\) need more bits than are available, and \(2^{n-1}\) is one more than the largest value.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.