File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Bit Manipulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Bit Manipulation" Watch "Bit Manipulation" New topic

Bit Manipulation

mario tan

Joined: Mar 09, 2005
Posts: 10
Hi guys,

What is the best tutorial for bit manipulation in java? I've tried reading some books but they only give an overview and few examples. It would be much better if a tutorial could cover up all the topics in bit manipulation and present more helpful examples and applications.

Please help me with this as I am so confuse with bit manipulation in java.
If I could not understand this topic, the more I could not understand complex programs that use bit manipulation.

Thanks in advance!

Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Bit manipulation in Java is very similar to C/C++ and the way it works in Java is as friendly as in other languages. You have your AND, OR, XOR, NOT operators, & | ^ ! , and your shift operators, << >> >>>.

Perhaps what you are needing is a general explanation of bitwise operations and how numbers (integer, floating point etc.) are stored in binary. Perhaps do some Google searches, without limiting yourself to Java.

Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
I agree. Here's the link:
subject: Bit Manipulation
It's not a secret anymore!