Problems
542 - Bitwise OR
SUBMIT PROBLEM

Bitwise OR

Time Limit: 1 sec

 

The Problem

The bitwise OR only operates at the bit level. Its result is a 1 if one of the either bits is 1 and zero only when both bits are 0. Its symbol is '|' which can be called a pipe.

 

Bitwise OR "|"

bit a bit b a | b (a OR b)
0 0 0
0 1 1
1 0 1
1 1 1

 

You will be given two integers as input. You have to output their bitwise OR as output.

 

For example,

if A = 5 and B = 4, then in binary A = 101 and B = 100.

So (A OR B) = (5 OR 4) = ( 101 OR 100 ) = 101 (binary) = 5 (decimal)

 

 

The Input

The first line contains a positive integer T ( 1<=T<=10000), denoting the number of test case. The next T lines will contain 2 integers A and B (0<=A,B<=2^32).

 

The Output

For each case, print bitwise OR(|) of A and B in seperate line.

 

Sample Input

2

5 4

5 3

 

Sample Output

5

7

 

 

 

Problem Setter: Shahin ShamS