def equal_to(field_values = {})
      all_num, none_num = self.equal_to_numbers(field_values)
      
      [].tap do |list|
        self.each_value { |num| list << num if (num & all_num) == all_num and (num & none_num) == 0 }
      end
    end
def equal_to(field_values = {})
      all_num, none_num = self.equal_to_numbers(field_values)
      
      [].tap do |list|
        self.each_value { |num| list << num if (num & all_num) == all_num and (num & none_num) == 0 }
      end
    end
Gives you an array of values where the given field names are exactly
 equal to their given field values.

 Possible values are derived from the bits list during initialization.

 Note: Order is not guaranteed. All numbers will be present, but there is
 no expectation that the numbers will be in the same order every time. If
 you need an ordered list, you can sort the result.

 @param [Hash] one or more field names or an integer for a known bit index
   as the key, and the value (integer or boolean) for that field as the hash
   value. Values that have more bits than available will be truncated for
   comparison. eg. a field with one bit setting value to 2 means field is 0

 @example Get different amount values
   gen = BitsGenerator.new(:is_odd => 0, :amount => [1, 2, 3], :is_cool => 4)
   gen.equal_to(:amount => 5) #=> [10, 11, 26, 27]
   gen.equal_to(:amount => 7) #=>  [14, 15, 30, 31]
   gen.equal_to(:amount => 7, :is_odd => 1, :is_cool => 1) #=> [31]

 @return [Array<Integer>] an array of integer values where the bits and values
   match the given input