The NOT bitwise operation inverts bits. A 000 becomes a 111. A 111 becomes a 000.
The NOT operator is often written as a tilde character ("~"):
python
~ 0000 0101
= 1111 1010
When numbers are printed in base-10, the result of a NOT operation can be surprising. In particular, positive numbers can become negative and negative numbers can become positive. For example:
python
~ 5 # gives -6
# At the bit level:
# ~ 0000 0101 (5)
# = 1111 1010 (-6)
This is because numbers are (usually) represented using two's complement, where the leftmost bit is actually negative. So flipping the leftmost bit usually flips the sign of the number.