Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitwise operator that "cancels out" after being applied k times

XOR is an operator that "cancels out" after being applied 2 times, in the sense that x ^ x = 0 for any x.

Is it possible to design (perhaps by composing XOR/AND/OR/NOT in some way?) a bitwise operator $, such that x $ x $ ... $ x (k xs in total) evaluates to 0 for any x?

like image 923
Zizheng Tai Avatar asked Dec 09 '25 09:12

Zizheng Tai


1 Answers

Yes, for example if the $ operator is defined such that x $ y = 0 for any x or y, then it will have the property you describe.

like image 164
M.W. Merritt Avatar answered Dec 11 '25 15:12

M.W. Merritt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!