how doing a not operation on 0 gives us -1.
Bitwise operation
not = ‘!’
‘~’ Binary Ones Complement Operator is unary and has the effect of ‘flipping’ bits.
Refer this Not understand the ~0
if u complement 0 then it gives 1 but the sign digit is also changing from 0 to 1
and if MSB is 1 then the no in decimal representation is -(minus)
so it is -1 ,I think it is clear now