This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
"how can we know that 11111111 is equlant to -1 ..how do u calculate..?"
For bytes, shorts, ints, and longs, negative numbers are represented using 2's-complement notation. To take the negative of a number, invert all the bits and then add 1. (Don't worry if there's overflow.) So to take the negative of 1, start with
Then invert all bits:
And add 1:
Note that if you invert all these bits and add 1, you've taken the negative of -1, and you're back at +1. There's an animated illustration that lets you play with this mechanism in Chapter 2 of "Ground-Up Java".
And you're right that bv<125 is ok.
Consultant to SCJP team.<br />Co-designer of SCJD exam.<br />Co-author of "Complete Java 2 Certification Study Guide".<br />Author of "Ground-Up Java".
Joined: Mar 14, 2003
so u have written the book java groundup.. and thats y naming it... any way... thanx and goodluck for ur book
is there is some pdf version available or any part of it u give for publicity ...so we can atleast get some info about book and to review the book regards, [ June 05, 2005: Message edited by: amit taneja ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com