Simplify bitwise operations in set, reset and flip.