Storing int value of bitmask - extract 1 valued bits
        Posted  
        
            by yankee2905
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by yankee2905
        
        
        
        Published on 2010-05-28T21:41:22Z
        Indexed on 
            2010/05/28
            21:52 UTC
        
        
        Read the original article
        Hit count: 335
        
I am calculating the int equivalent of a given set of bits and storing that in memory. From there, I would like to determine all 1 value bits from the original bitmask. Example:
33 --> [1,6]
97 --> [1,6,7]
Ideas for an implementation in Java?
© Stack Overflow or respective owner