The & operator does a bitwise AND. Check out logic operators.