The bitwise AND operator (&) compares each bit of the first operand to the corresponding bit of the second operand. If both bits are 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.
So if (button & 1) is 1 then if(button & 1)==1 evaluates true otherwise evaluates to false.