Write a function using bitwise operators to clear, set, and toggle specific bits within a 32-bit register.