case by case i guess. If you only want to test Bit 15...
One way

IF MyVar>=32768 then PlahBlahPouetPouet

The use of Logical and Bitwise operator is also another option
http://msdn2.microsoft.com/en-us/lib...US,VS.80).aspx

In conjunction with a Bit shift it will be the paradise...
MyCode=1010 0010

I want to test Bit 1 of MyVar
in PBP:
ToTest=(MyCode>>1) & 1
IF ToTest=1 then TagadaTzouinTzouin

OR

If MyCode.1=1 then JoyeuxNoel

In VB... it's a bit different
ToTes=(Mycode/2) AND 1
If ToTest=1 then DansonsLePiedDePoule

It's only math