A way to invert the binary value of a integer variable

后端 未结 6 536
忘掉有多难
忘掉有多难 2020-12-10 10:44

I have this integer int nine = 9; which in binary is 1001. Is there an easy way to invert it so I can get 0110 ?

6条回答
提交回复
热议问题