def union(bitfield)
      raise "That's not a bitfield" if ! bitfield.is_a?(Bitfield)
      raise "bitfield lengths must be equal" if ! bitfield.length == length
    
      result = Bitfield.new(length)
      (@data.length).times do |i|
        result.data[i] = @data[i] | bitfield.data[i]
      end
      result
    end
def union(bitfield)
      raise "That's not a bitfield" if ! bitfield.is_a?(Bitfield)
      raise "bitfield lengths must be equal" if ! bitfield.length == length
    
      result = Bitfield.new(length)
      (@data.length).times do |i|
        result.data[i] = @data[i] | bitfield.data[i]
      end
      result
    end
Calculate the union of this bitfield and the passed bitfield, and
 return the result as a new bitfield.