Please help

How to flip bits of a number in C++? for ex: 5->101 should become 010 which is 2
Use the XOR bitwise operator (^).
http://www.cplusplus.com/doc/boolean/
Topic archived. No new replies allowed.