text: Numbers formed by flipping common set bits in two given integers | Function to flip bits of A and B which are set in both of them ; Clear the bits of A which are set in both A and B ; Clear the bits of B which are set in both A and B ; Print updated A and B ; Driver Code
code: function flipBitsOfAandB ( A , B ) { A = A ^ ( A & B ) ; B = B ^ ( A & B ) ; document . write ( A + " " + B ) ; } var A = 10 , B = 20 ; flipBitsOfAandB ( A , B ) ;