The expression
!(x ^ 32)
will do the trick for you if you insist.
That will always work in C, and will also work in almost all C++ settings. Technically in C++ it evaluates to a boolean which in almost all circumstances will work like 0 or 1, but if you want a technically correct C++ answer:
(0 | !(x^32))
or:
(int)!(x ^ 32)
or with the more modern / verbose C++ casting
static_cast<int>(x ^ 32)