Search code examples
binarybit-manipulationbinary-dataxor

How do you calculate Pairwise XOR?


How is pairwise XOR calculated ? I googled but could not find anything relevant.

EDIT : How is it different from normal XOR?


Solution

  • Each bit of the number are pairwise XOR'd with each other. For example:

      15 = 0000 1111
      21 = 0001 0101 
    

    So, the XOR is

           0001 1010 = 26