To convert the result of ^ from 1 or 0 to logical true or false, you can 'not' it twice:
According to web site http://www.howtocreate.co.uk/xor.html, the best solution, that will work with any data type, is the following:
In the examples above, to convert all data types to logical true or false before comparing them, each operand is negated by "!". This turns false to true and vice versa, but that's ok, because the != comparison still works. All that matters to be an exclusive or is that the two operands aren't equal -- one must be true and the other false.