The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Binary representation of negative number.

Posted by John on June 21, 2001 at 4:45 PM

> Hi - I was a little confused on how to calculate the bit representation of a negative number.

You take the one's compliment & then add one to it.
The result will be the negative represenation of that number,
assuming that the left most bit is set to 1 to signify that it
is a negative value.

A brief tutorial can be found on the ff. page:


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us