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
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 ]
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.