The binary operation exclusive OR (XOR) is a binary operand from Boole algebra. This operand will compare two bits and will produce one bit in return:
- Two bits that are equal: 0
- Two bits that are different: 1
This is the opposite to binary. For example, we are going to use the word tread in ASCII format and then we are going to insert a key using the word hello so that we can complete an XOR operation. See the following diagram:
XOR encryption is commonly used with AES, several symmetric ciphers, and a one-time pad.