[Tutor] how to read one bit of a byte
ALAN GAULD
alan.gauld at btinternet.com
Thu Feb 22 00:59:42 CET 2007
>>> a & 128 will be 128 if the high bit in a is set, 0 if it is not.
>>>
>>
>> Only for an 8 bit integer! Most integers nowadays are
>> 32 bit so you need to use 0x80000000 to get the msb!
> Right, but if you read the thread it is about byte values read from a
> file so presumably he is talking about 8-bit integers.
Good point.
:-)
Alan G.
___________________________________________________________
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
More information about the Tutor
mailing list