Dodatkowe przykłady dopasowywane są do haseł w zautomatyzowany sposób - nie gwarantujemy ich poprawności.
Using the XOR swap algorithm, however, no temporary storage is needed.
For example, the XOR swap algorithm requires sequential execution of three instructions.
A C function that implements the XOR swap algorithm:
The underlying principle of the XOR swap algorithm can be applied to any operation meeting criteria L1 through L4 above.
Feistel cipher (the XOR swap algorithm is a degenerate form of a Feistel cypher)
This is actually a generalization of the proof for the XOR swap algorithm: XOR is both the addition and subtraction in the abelian group .
XOR can be used to swap two numeric variables in computers, using the XOR swap algorithm; however this is regarded as more of a curiosity and not encouraged in practice.
See the C example of the xor swap algorithm that is a function; it assumes the two pointers passed to it are distinct, but if they are in fact equal (or aliases of each other), the function fails.