Metraipolis › archive › dc_3be1f088e1ab
XOR swap algorithm — Wikipedia (en)
- Source
- Wikipedia (en)
- Original
- https://en.wikipedia.org/wiki/XOR_swap_algorithm
- License (as archived)
- CC-BY-SA-4.0
- Archived
- 2026-10-07T17:54:59.272Z
- SHA-256 of the archived text
da4c57b26c80a3b8398c8f5a8a7e02b16c2a204fb9dc4d55bfaca368ab13e5d4- Stable URL of this page
https://metraipolis.com/documento/dc_3be1f088e1ab
How to cite
XOR swap algorithm — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/XOR_swap_algorithm (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_3be1f088e1ab (Metraipolis archive dc_3be1f088e1ab, sha256 da4c57b26c80a3b8398c8f5a8a7e02b16c2a204fb9dc4d55bfaca368ab13e5d4)
BibTeX
@misc{dc3be1f088e1ab,
title = {XOR swap algorithm — Wikipedia (en)},
howpublished = {Wikipedia (en)},
url = {https://en.wikipedia.org/wiki/XOR_swap_algorithm},
note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_3be1f088e1ab; sha256 da4c57b26c80a3b8398c8f5a8a7e02b16c2a204fb9dc4d55bfaca368ab13e5d4},
year = {2026}
}Archived text
Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/XOR_swap_algorithm. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
In computer programming, the exclusive or swap (sometimes shortened to XOR swap) is an algorithm that uses the exclusive or bitwise operation to swap the values of two variables without using the temporary variable which is normally required. The algorithm is primarily a novelty and a way of demonstrating properties of the exclusive or operation. It is sometimes discussed as a program optimization, but there are almost no cases where swapping via exclusive or provides benefit over the standard, obvious technique. Tema degli esploratori: statistica e scienza dei dati (deposito sistematico; categoria «Algorithms»). Fonte: Wikipedia in inglese, voce «XOR swap algorithm» — https://en.wikipedia.org/wiki/XOR_swap_algorithm Wikidata Q5318442 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q5318442 Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/XOR_swap_algorithm?action=history). Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza. Estratto dell'introduzione non modificato nel contenuto; revisione 1350439478, consultata il 2026-10-07T17:24:51.375Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: b8b7243ae201570a2a722202c9c620c6fe8a4261fc32b6cc29e5aec6c49db2bf