The NOT operator flips a boolean value. true becomes false, and false becomes true. Written as ! in most languages, or not in Python. Mathematically: .
NOT is a unary operator, meaning it takes one input instead of two. It negates whatever boolean expression follows it.
Example: if (!isBlocked) runs when isBlocked is false. Double negation cancels out: !!true is true again.