Probably the fastest and easiest way yes.

http://en.wikipedia.org/wiki/Power_of_two#Fast_algorithm_to_check_if_a_positive_number_is_a_power_of_two


On 27 apr, 17:58, rjgtav <[email protected]> wrote:
> Hi. While searching on the web, i found that there is another (less
> complicated - for me) way to check if the value is Power of two:
>
> return (value & (value - 1)) == 0;
>
> What do you think?

Reply via email to