Bitwise operations are mathematical in nature but are largely relevant in programming. I have a question pertaining to bitwise operators but am not sure which site to post it on.
My question: How can I determine what values of edx
make energy
equal to eax
in the equation energy = (eax XOR 0x01010101) XOR edx
where eax = (edx XOR energy) XOR 0x01010101
? Plugging in random numbers and checking results is unfavorable. I need a clear cut solution. All variables are 4 byte unsigned integers represented in hex.
XOR 0x01010101
with a certain value to geteax
. Just like ify = 4
inx + 3 = y
then x will always be 1.eax
values, or programmatically for arbitraryeax
values. These potentially would have required very different types of answers, so it's entirely possible that the best site to post it on is different for the two cases. Can you edit your question to make it clearer which one you're interested in?XOR 0x01010101
with a certain value to geteax
" -- Not really. Note that, in your analogy, there is exactly one solution because f(x) = x + 3 is a bijection.