Unary "~" performs bitwise negation, i.e., 1's complement. For example, 0666 & ~027 is 0640.