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 bitwise and shift operators Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "bitwise and shift operators" Watch "bitwise and shift operators" New topic
Author

bitwise and shift operators

Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
could somebody explain when, why, and what bitwise and shift operators are used? I am very confused about them and don't see very much of a point to them.
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
Manish Joshi
Greenhorn

Joined: Oct 16, 2000
Posts: 16
Hi donot worry about the buttons of intelligence OR brightness to be working Happy that the monitor On/OFF butoon is OK and the button is On

Any way bitwise operators are majorly used in embedded system where there is always Space complexity
So these operators are used to findout the bitpattern of the number so that calculation can be done faster like If I m interested in multiplying the number and make it double i will just left shift it by One
Hope this much justification is enough
Manish
javaexams@yahoo.com
Brett Knapik
Ranch Hand

Joined: Oct 15, 2000
Posts: 255
thank you manish.
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
One of the biggest uses of bit manipulation today, if not the biggest, is data encryption and license information. A value know to both ends of the transmission (know as a key) is & on to the data when transmitted and | off when recieved (basically). If you are writing your own private encryption for transmission or license keys for your software, you can use your own combination of shifting, & | ~ etc to ensure that your information is difficult to crack.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bitwise and shift operators