Node:Bitwise NOT, Next:, Previous:Truth tables and bit masks, Up:Truth tables and bit masks



Bitwise NOT

The unary operator NOT (~) simply generates the one's complement of the bit string; that is, it returns the same bit string, with all ones replaced with zeros and all zeros replaced with ones. As a truth table this would be summarized as follows:

~value result
0 1
1 0