How to iterate subsets of a bitmask in increasing order?

Revision en1, by -synx-, 2017-05-25 11:46:30

I know how to iterate them in decreasing order using the operation (s-1)&x.
How can we generate them in increasing order?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English -synx- 2017-05-25 11:46:30 184 Initial revision (published)