File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Importance of Bitwise Operators Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Importance of Bitwise Operators" Watch "Importance of Bitwise Operators" New topic
Author

Importance of Bitwise Operators

Mubeen Shaik
Ranch Hand

Joined: Jan 26, 2004
Posts: 67
Hi All,
I am new to Java and learing java. I want to know the importance of Bitwise operators (Shift left , Shift Right). Are these really useful in a business application?

Thanks,
Shaik.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I've usually used them in other languages in much lower-level stuff, interpreting flags and bitmaps from the operating system. I made a little class to convert from IBM mainframe packed decimal to integer the other day that used shift, & and | operations, again pretty low-level. Any other typical applications out there?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Shaik,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Maarten Vergouwen
Ranch Hand

Joined: Jan 12, 2004
Posts: 60
The bitwise operators are very rarely used in business applications.
Their main advantage is speed, so they are used quite a lot in graphics-heavy applications (like games).
In business-apps they are a liability in my opinion, as they hide logic in a very obscure, hard-to-decipher-afterwards way.
Jason Cox
Ranch Hand

Joined: Jan 21, 2004
Posts: 287
In five years I have yet to use them in a single functional program that I've written.
However, it might be useful to learn them, at least well enough to pass certification, because you never know when you might end up at a job where that kind of knowledge might be useful.
Mubeen Shaik
Ranch Hand

Joined: Jan 26, 2004
Posts: 67
Originally posted by Dirk Schreckmann:
Shaik,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!

Dirk Schreckmann,
Shaik is my last name.
Thanks
Shaik.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Importance of Bitwise Operators