An Xor explanation
A simple guide to understanding Xor.
AI
KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Quellcode
What is Xor? This article will tell you why 10 Xor 12 is 6 and other stuff like that so anyway. Lets just start simple. Xor is done in binary so, the first step would be to convert the numbers into binary. 10 in binary is 1010 and 12 in binary is 1100. This can be figured out by using the windows calculator. (I'll save counting in binary and binary conversions for the next article.) So how does 1010 Xor 1100 = 6? The simplest way to do this would be to write the up and down like you were about to add them. 1010 1100 OK. Now Xoring (whatever) them is real simple. Just add them, but when ever you see a 2 write 0 instead. So, 1010 1100 = 0110 Simple, yes! 110 (you can remove 0's at the beggining) in decimal is 6! One last thing worth mentioning is if there arn't enough digits in a number count them as 0's. For example: 1101 110 = 1011 You count the blank spaces as 0's. This is my first article so please comment!
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine