_popcnt64 ( a ) gives number of 1 's present  in binary representation of a. If number  of 1s is half of total bits, return true.
return ( BitCount ( ( int ) a ) == ( ULL_SIZE >> 1 ) ) ; } static int BitCount ( int n ) { int count = 0 ; while ( n != 0 ) { count ++ ; n &= ( n - 1 ) ; } return count ; }