Set, Clear, Toggle Bits in Register
Implement functions to set, clear, and toggle bits in a register.
Constraints
- Use bitwise ops.
- Return new value.
- Only bit 0 affected.
1int setb(int x);2int clearb(int x);3int toggleb(int x);
Implement functions to set, clear, and toggle bits in a register.
1int setb(int x);2int clearb(int x);3int toggleb(int x);