Bit Manipulation Arithmetic and Order of Operations

Viewed 21

I am new to bit manipulation and just came across a situation where I was asked to find the inverse of XOR. It turned out to be XOR itself. This got me to thinking.

Given x = a ^ b | ~c & d if I gave you x, a, b, and d how would you solve for c?

If we go back to basic arithmetic, if I have something like x = a - b + c * d I know the order of operations and how to move each variable to the other side of the equation. But I don't know how to do this with logical operations.

Appreciate any help!

0 Answers
Related