Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two's complement significance

 
Sridevi Shrikanth
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the significance of representing number in two's complement?
 
Steve Fahlbusch
Bartender
Posts: 602
7
Mac OS X Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It allows for all bits to be represented while eliminating the embarrassing problem of having a positive and negative zero.
for example: an 8 bit number allows values of -128 to 127.

[This message has been edited by Steve Fahlbusch (edited January 23, 2001).]
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Steve is correct.
For more discussion on this please refer to a past
discussion
and also a discussion on Signed and Unsigned numbers - which elaborates the discussion.
regds.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic