If the bitwise OR of n and i is equal to n , then include i in the set
if ( ( i n ) == n ) { v . add ( i ) ; } } for ( int i = 0 ; i < v . size ( ) ; i ++ ) { System . out . print ( v . get ( i ) + " ▁ " ) ; } }