Reverse the binary representation of a number.

Objective: Write a program to Reverse the binary representation of a number

Example:

Input : 30
Output : 15

Explanation:

binary representation of 30 is : 11110
reverse of binary representation : 01111
decimal of reversed binary representation is : 15

Input: A Number

Output: Decimal of reversed binary representation of a number.

Approach:

Read more