I'm trying to turn 1's into 0's and vice versa of a binary number, and I thought bitwise NOT (~) would do the job as I've done it before on C code, but it doesn't work like that on Python.
Example
I have a binary 'a'
a= 0b1010 = 10
I used '~' and I get this:
~a=-0b1011 = -11
But I want this:
~a=0b0101 = 5
what is the right way to do it?
THANKS!