Why is ~0 = -1 and not 1?

Does ~ stand for “not”?

@yobasu2015
not = ‘!’
‘~’ Binary Ones Complement Operator is unary and has the effect of ‘flipping’ bits.
you can read more about them from here https://www.tutorialspoint.com/cplusplus/cpp_operators.htm