How to find decimal of a number in One's Complement form?

  • Thread starter Thread starter Aristotle
  • Start date Start date
  • Tags Tags
    Form
AI Thread Summary
To find the decimal value of a number in one's complement form, the first step is to identify the sign bit, where a '1' indicates a negative number. For the binary number 1111111, inverting the bits results in 0000000, which represents positive zero. Since the original number has a sign bit of '1', it is interpreted as negative zero. This means that in one's complement, all 1's represent negative zero, and some processors may convert this to positive zero in their results. Understanding these nuances is crucial for accurate calculations in binary systems.
Aristotle
Messages
169
Reaction score
1

Homework Statement


Assume the number
https://www.physicsforums.com/tel:1111111
Is in one's complement form, what is its decimal values?

Homework Equations



2^7 + 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0

1 in first sign bit indicates negative
0 in first sign bit indicates positive

The Attempt at a Solution



The first thing I did to solve this problem is that we know that 1111111 is already in 1's complement form and so I inverse the bits and got 0000000. Noticing that there is a 1 in the first sign bit of the binary 1111111 that is in 1s complement form, I included a 'negative' to the decimal 0. From the inverse number 0000000... Is simply added to equal 0...and got -0.

is this the correct method in approaching this? any guidance would be appreciated! Thank you[/B]
 
Last edited by a moderator:
Physics news on Phys.org
In one's complement, all 1's is negative zero. Some processors will automatically convert all 1's to all 0's in their results.
 
Back
Top