Suppose I have an integer
In c++, as this
uses 4 bytes(32 bits) of memory, all bits would be occupied by either
's. So, I wish to flip the values of each bit. That is, wherever in each bit there is
convert it to
Is there an easy way to go about this?
Edit: I also want to play with boolean algebra also. That is if I can execute basic boolean operations like addition, subtraction, etc.