Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. In computer programming, the XOR swap is an algorithm that uses the XOR bitwise operation to swap values of distinct variables having the same data type without using a temporary variable. Distinct" means that the variables are stored at distinct memory addresses the actual values of the variables do not have to be different. Conventional swapping requires the use of a temporary storage variable. Using the XOR swap algorithm, however, no temporary storage is needed. The algorithm typically corresponds to three machine code instructions. Since XOR is a commutative operation, X XOR Y can be replaced with Y XOR X in any of the lines."
Les informations fournies dans la section « A propos du livre » peuvent faire référence à une autre édition de ce titre.