you can use bitwise and ( & )
Print 7 & %00000010
Function bitIsSet(bit:Int , value:Int) mask:String = "" For Local i:Int = 8 To 1 Step -1 If i = bit Then mask:+ "1" Else mask:+ "0" EndIf Next If mask.toInt() & value Then Return True Else Return False End Function For Local i:Int = 1 To 8 Print bitset(i, 7) Next