Created
August 11, 2022 12:12
-
-
Save CodeDrome/5902a6914c31cbedd925a67f62e37822 to your computer and use it in GitHub Desktop.
xor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = 45 # 00101101 = 45 | |
b = 99 # 01100011 = 99 | |
a = a ^ b # 01001110 = 78 (irrelevant intermediate value) | |
b = a ^ b # 00101101 = 45 | |
a = a ^ b # 01100011 = 99 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment