dim a as byte
dim b as long
'als Zuweisung
a = a and 0b00000111 ' the Bits 3-7 would be cleared
a = b and 0x000000ff ' read only the lowest byte
'als Abfrage
if (a and 0b00000111) then
  ' Condition is true if one or more of bits 0-2 are set
end if