Validation of data in electronics
Remembering that in computers everything is ultimately a number which may represent a character of the alphabet or anything else for that matter when taken in context.

The comparison for two items being the same is a subtraction; if the items are the same then the result is zero which then sets the (almost universal) Z flag to the true state (often in a status register).

We can use the XOR function (note that XOR actually implements modulo 2 addition and is the basis of half adders and subtractors - modulo 2 addition is identical to modulo 2 subtraction).

So if Z is true, then the two items were the same and if Z is not true, the items were different.

For a data word of N bits in size, there will be N bits of subtraction; if they all result in zero (which can be decoded as bitN result..bit0 result all equal zero) then the items were the same.