Bitwise NOT operator (unary) ~exp bitwise NOT exp any integral type (int, char, enum, etc) The unary operator ~ performs a bit-by-bit complement on exp, converting each 0 bit to a 1 and each 1 bit to a 0. The result is of the same type as exp. For example: j = 0x0F71; i = ~j; /* i == 0xF08E */ Seealso: