The NOT operator (~) flips every bit in a number. Every 0 becomes 1, and every 1 becomes 0.
Example: . In 8-bit binary, . Flipping all bits gives . But here's the catch: computers use signed integers with two's complement representation, so in most programming languages.
You won't use NOT as often as the other operators, but it's useful when combined with AND to clear specific bits.