Define One's Complement Operator?
The one's complement operator, occasionally called the "bitwise NOT" or "bitwise complement" operator produces the bitwise one's complement of its operand. The operand should be of integral type. This operator performs common arithmetic conversions the result has the type of the operand after conversion.
In the following instance the new value assigned to y is the one's complement of the original unsigned short value:
// Example of the one's complement operator
unsigned short y = 0xAAAA; // value of y is 0xAAAA
y = ~y; // value of y is 0x5555