! is the logical negation operator. It will produce 0 if the operand is non-zero and 1 if the operand is zero. You could learn this in the most rudimentary documentation of the language.