Bitwise operations combine bit patterns in specific places.
AND (&): 1 if both are 1 → Clear/mask bits
OR (|): 1 if at least one is 1 → Set bits
NOT (~): Inverts each bit → ~x = −x−1
XOR (^): 1 if they are different → Toggle bits
De Morgan: ~(a & b) = (~a) | (~b)