Flipping bits No and Binary Format in Reverse Order
Easy Accuracy: 50.37% Submissions: 272 Points: 2
You will be given a list of 32 bits unsigned integers. You are required to output the unsigned integers you get by flipping bits in its binary representation (i.e. unset bits must be set, and set bits must be unset) and its binary no in reverse order.
Explanation- Take 1 for example, as unsigned 32-bits is 00000000000000000000000000000001 and doing the flipping we get 11111111111111111111111111111110 which in turn is 4294967294 and its reverse order is 01111111111111111111111111111111.
Take 2 for example, as unsigned 32-bits is 00000000000000000000000000000010 and doing the flipping we get 11111111111111111111111111111101 which in turn is 4294967293 and its reverse order is 1011111111111111111111111111111.
Input Format- No of Test cases t, followed by Integer n.
Output Format- flipped no of n followed by space and then its binary representation in reverse order.