Off the top of my head, I cannot think of a single language I've used that had a logical exclusive or operator, but all have logical and bitwise and
and or
operators.
Looking around, the only reason to this that I could find was that exclusive or cannot be short circuited, so a logical version would be useless, which I really can't see being the case. The reason it came to my attention that most languages lack this is that I needed it (I was using Ruby, so I wrote a method to convert an integer to a boolean, and then use bitwise XOR, which on booleans acts like logical XOR).
Just using bitwise XOR does not work either, because it will give a different result.
0b0001 ^ 0b1000 = 0b1001 (True)
0b0001 XOR 0b1000 = False
// Where ^ is bitwise exclusive or and XOR is logical exclusive or
// Using != (not equal to) also doesn't work
0b0001 != 0b1000 = True
So why is it that most languages do not include a logical exclusive or operator?
Edit: I added an example with how !=
also does not do what I want, it almost does, but falls into the same problem that using bitwise exclusive or does, it only works if you know that you are working with zero or one, and not any other number.
And to note, this is assuming that language uses zero as false and nonzero as true.