this algo sets all bits to zero Debajyoti

 refer http://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious

Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652


On Sat, Jul 24, 2010 at 10:20 AM, Debajyoti Sarma <[email protected]
> wrote:

> for(i=sizeof(int)*8-1;i>=0;i--)
> {
> if((number>>i)&1)
> {
> number=number^(1<<i);
> break;
> }
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to