You provided the code and ask us to provide the mathematical equivalent - so I'm going to take your code literally and consider it a C-like language.
In this environment, ^ is a bitwise XOR operator. So, after the cycle x = 10, since it was XOR-ed with a constant of 2 (switching bits of the next least significant bit) an even number of times.
- ?