top of page

Reverse Bits
Problem :
Given a non-negative integer num, write a program to return the number obtained after reversing the bits of num.
Problem Note :
IThe actual binary representation of the number is being considered for reversing the bits, no leading 0 is being considered.
Example :
Input: 13
​
Output: 11
Explanation: Binary representation of 13 is 1101. After reversing the bits we get 1011 which is equal to 11.
Solution :
![reverse_1[1].jpg](https://static.wixstatic.com/media/4fdaed_31fca96b2fc64ce09d6875a776d07629~mv2.jpg/v1/fill/w_178,h_396,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/reverse_1%5B1%5D.jpg)
![reverse_2[1].jpg](https://static.wixstatic.com/media/4fdaed_879d1e94cf124a84afe2c45d21d43e02~mv2.jpg/v1/fill/w_178,h_396,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/reverse_2%5B1%5D.jpg)
![reverse_3[1].jpg](https://static.wixstatic.com/media/4fdaed_b6e0a8741fd44f8baacf65b388fa06ed~mv2.jpg/v1/fill/w_178,h_396,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/reverse_3%5B1%5D.jpg)
First Screen is the landing page of the application.
second Screen, Enter the number and just click the button FIND REVERSE BIT NUMBER
third Screen, tells you about the result
bottom of page