Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bitwise and shift operators

 
Brett Knapik
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Manish Joshi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic