Quote:
Originally Posted by
Octal
Or maybe not? I know that the bit 7 in there is the 'case bit', which can turn on/off weather the character is capital. So I'm assuming you can use other bits in this fashion?
Not quite,
In Ascii, the lower case are 'a' to 'z', which are 0x61 to 0x7A, and upper case are 0x41 to 0x5A, so you could treat bit 6 as a case bit if the character falls in this range, but this falls down when you add diacriticals.
There are the the << and >> operators, which will shift a value left or right a number of bits. Hence (x)<<7 would convert 0x01 to 0x40 for example.
Note that the least significant bit is consider "bit zero", and has a value of 1. If you set "bit one", you would have a value of two.