Search code examples
mathbitwise-operatorsxor

XOR multiplication and order of arithmetic operations


I have a dumb question, and I am embarrassed to even ask. Due to my little knowledge in math I couldn't figure out what should I search.

I'm dealing with the following equation:

[(a*x)^b]*c=d

where ^ stands for XOR and * for Multiplication.

How can I isolate x?


Solution

  • [(a*x)^b]*c=d
    [(a*x)^b]=d/c
    (a*x)^b^b=(d/c)^b  //double xor with b retrieves initial value
    (a*x)=(d/c)^b
    x = ((d/c)^b) / a