Consider one operation on values x=ai and y=aj.
After the operation we get (x&y, x∣y).
Look at one bit independently.
If the bit values are (0,0) or (1,1), they stay the same.
If the bit values are (0,1) or (1,0), after the operation they become (0,1) where the AND side gets 0 and the OR side gets 1.
So for every bit, the number of ones in the whole array is invariant.
For every bit, the operation on indices (i,j) acts like a compare-swap on that bit, producing (min,max) for that bit.