syntax question

Are you sure about that last result ?

B0011 & (1<<2)=B100

The result should be B000

You know when a particular bit is high because the result of the bitwise AND is not zero
Run this to see how

byte test = B1010;

void setup() 
{
  Serial.begin(9600); 
 Serial.println(test,BIN); 
  for (int a = 0;a <= 3;a++)
  {
    int x = test & (1 << a);
    Serial.print(a);
    Serial.print("\t");
    Serial.print(x ,BIN);
    Serial.print("\tbit ");
    Serial.print(a);

    if (x == 0)
    {
      Serial.println("\tis not set");       
    }
    else
    {
      Serial.println("\tis set");
    }
  }
}

void loop() {}