How do I change the bitwise OR operation?
2 answers
You cannot get a definite answer in the general case. If C=A|B
, then wherever you have a 1 in C and a 1 in A, the corresponding bit of B can be either 0 or 1.
In your example, 93 | 199 = 223, but 92 | 199 is also 223. So given 223 and 199 there is no single answer (in fact, there are 32 possible answers in this example).
+13
source to share