Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shift & Bitwise Operators

 
John Uhlig
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone provide me with some real world examples of where shift and bitwise operators might be used? I understand (kinda) what they are doing, but can't think of when they would be used.
Also, is there a good webpage to explain them in more detail? I need to understand the whole shift and bitwise thing better.
Thanks,
John
 
John Hembree
hired gun
Ranch Hand
Posts: 250
MS IE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't used anything with shifting other than for simple multiplication and division but I have used the bitwise operators to compare bit values from Microsoft's Active Directory. Certain account properties are masked and the different bits represent specific account attributes.
Here's a web page from Microsoft on ADSI with AD, look for the section called "Putting the Pieces Together"
[ June 04, 2003: Message edited by: John Hembree ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to try a quick search on this forum for past conversations on this topic. I know we've brewed over it a few times.
Also, if ya haven't yet discovered it, you might want to take a look at the "Cat and Mouse Games with Bits" story over in The JavaRanch Campfire Stories.
Good luck.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic