Check if n is divisible by power of 2 without using arithmetic operators | GeeksforGeeks

preview_player
Показать описание

This video is contributed by Shubham Ranjan.

Please Like, Comment and Share the Video among your friends.

Install our Android App:

If you wish, translate into local language and help us reach millions of other geeks:

Follow us on Facebook:

And Twitter:

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

is using bit solution is faster than using arithmetic?

imadudin
Автор

Hey Shubham Ranjan u also contributed in one of the previous videos in which in order to calculate the no of bits in a no, u did log of the no to the base 2 and then add 1, I asked a question which I am now asking again here, what was the reason/logic behind taking log of the no?? Pls tell.
Thanks for this video. It's nice👌👌

trishalarora