As I learn to get comfortable programming for the palm with pocketC the more I find I know so little. Right now I am trying to find info on how to really understand the bit-wise operators, namely &,|,^,<< and >>. I understand logically how they work. At a bitwise level however I fail to fully grasp the concept and how it could be applied in the real world.

Example: If I wanted to use a piece of data as a series of flags or switches, how would I store them and then read them later at the 1-0 level. It could be useful if you have the need for lots of variables that will only have a yes or no value stored in it.

If anyone can steer me to some documentation that actually explains this please let me know. The PocketC documentation is thin there. My book on C is the same way. I would like to be able to use a single variable to store a multitude of 1's and 0's to be used as flags.

Wolfgang,
Thanks for the info and code. That was exactly what I needed to clear things up. Such a simple concept but the code I have been working with only used this method to set the least significant. I now GET it. BTW, I have used your tutorials on your site while I was learing, they have always been helpful.