This OR That
The bitwise OR of two integers is the integer obtained by doing OR on each bit and concatenating them. Here is an example:
Chris has a list of \(10^5\) positive integers all of which are atmost 30 bits long. He wants to find out the sum of the bitwise OR for all possible pairs of them. However, due to the size of the input, he believes that it will take an awful lot of time.
Can you surprise him by finding the answer in reasonable time?