def intersection(bitfield)
      raise "That's not a bitfield" if ! bitfield.is_a?(Bitfield)
      raise "bitfield lengths must be equal" if ! bitfield.length == length

      newbitfield = Bitfield.new(length)
      newbitfield.copyFrom(self)
      newbitfield.intersection!(bitfield)
    end
def intersection(bitfield)
      raise "That's not a bitfield" if ! bitfield.is_a?(Bitfield)
      raise "bitfield lengths must be equal" if ! bitfield.length == length

      newbitfield = Bitfield.new(length)
      newbitfield.copyFrom(self)
      newbitfield.intersection!(bitfield)
    end
Calculate the intersection of this bitfield and the passed bitfield, and
 return the result as a new bitfield.