your best way to do it would be

(!b1 ^ !b2)


where b1 and b2 are expressions.

That is, assuming that ! will return the same boolean type for both.

int a=1;
int b=2;

assert (! ( !a ^ !b ));