This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes ~30 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "~30 " Watch "~30 " New topic
Author

~30

Otto Deckelman
Ranch Hand

Joined: Mar 28, 2001
Posts: 30
I believe the symbol is called a tilda, but correct me if I'm wrong. What does this mean and represent in computer math? Art M. replied to my question yesterday about bitwise shift operators and used this in his explanation.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Otto -
Yes, this symbol is called a tilde, and it is the bitwise inversion operator. Basically what it does is switch all the bit values of an integer value from 0 to 1 and from 1 to 0...
so :

So the bitwise inversion of 15 = -16 and the bitwise inversion of 30 = -31...
Does this make sense?
HTH,
-Nate
[This message has been edited by Nathan Pruett (edited April 06, 2001).]


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Otto Deckelman
Ranch Hand

Joined: Mar 28, 2001
Posts: 30
thanks, it helps alot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ~30