BETA

Difficulty Level: Easy

Submissions: 187 Accuracy:

44.39%

Flipping bits No and Binary Format in Reverse Order
     

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.

Constraints-
1<=T<=200
0<=n<=
4294967296 (232)

Example:
Input:

2
1

2
Output:
4294967294 01111111111111111111111111111111
4294967293 10111111111111111111111111111111

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Shubham Nagaria

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.