(February 2012) Using the XOR swap algorithm to exchange nibbles between variables without the use of temporary storage 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 different memory addresses; the actual values of the variables do not have to be different. Contents Conventional swapping requires the use of a temporary storage variable. Using the XOR swap algorithm, however,
Read full article from XOR swap algorithm - Wikipedia, the free encyclopedia
No comments:
Post a Comment