

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Exclusive or (XOR)
incomplete
2: XOR Quiz
incomplete
3: One Time Pad
incomplete
4: Perfect Security
incomplete
This lesson's interactive features are locked, please to keep using them
The "exclusive or" operator is very important in cryptography.
XOR, or "exclusive or" operates on binary data. It returns true if both of its inputs are opposites (one false and one true), otherwise, it returns false. You may see the operator written this way: ⊕.
Interactive example available with JavaScript enabled.
Write a function xor() that takes two boolean values as input and returns the result of the "exclusive or" operation.