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

  • Thread starter Thread starter Aristotle
  • Start date Start date
  • Tags Tags
    Form
Click For Summary
SUMMARY

The discussion focuses on converting the binary number 1111111 from one's complement form to its decimal equivalent. The method involves inverting the bits to obtain 0000000, which represents negative zero due to the first sign bit being 1. This approach confirms that in one's complement, the representation of all 1's results in negative zero. Additionally, some processors may automatically convert all 1's to all 0's in their calculations.

PREREQUISITES
  • Understanding of binary number systems
  • Knowledge of one's complement representation
  • Familiarity with sign bits in binary numbers
  • Basic arithmetic operations with binary numbers
NEXT STEPS
  • Research the differences between one's complement and two's complement representations
  • Learn about binary arithmetic operations in various number systems
  • Explore how different processors handle binary representations and conversions
  • Study the implications of negative zero in programming and computer architecture
USEFUL FOR

Students studying computer science, software developers working with low-level programming, and anyone interested in binary number systems and their applications in computing.

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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
17K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 24 ·
Replies
24
Views
7K