clears a bit, allowing access beyond the current set size without changing the size.
163239
public void clear(long index) {
        int wordNum = (int)(index >> 6); // div 64
        if (wordNum>=wlen) return;
        int bit = (int)index & 0x3f;     // mod 64
        long bitmask = 1L << bit;
        bits[wordNum] &= ~bitmask;
    }
60800
public void remove(BitSet other)
    {
        int idx = Math.min(wlen, other.wlen);
        long [] thisArr = this.bits;
        long [] otherArr = other.bits;
        while (--idx >= 0)
        {
            thisArr[idx] &= ~otherArr[idx];
        }
    }
907017
def _unset(self, pos):
        """"""
        assert 0 <= pos < self.len
        self._datastore.unsetbit(pos)
501913
public void clear() {
	if (size() == 0) return;
	buffer = new char[buffer.length];
	root.next = null;
	pos = 0;
	length = 0;
	curr = root;
    }
208016
def bits_clear_in_range( bits, range_start, range_end ):
    
    end = range_start
    while 1:
        start = bits.next_clear( end )
        if start >= range_end: break
        end = min( bits.next_set( start ), range_end )
        yield start, end
1257903
private int nextSetBit(int fromIndex) {
      if (fromIndex < 0)
         throw new IndexOutOfBoundsException("fromIndex < 0: " + fromIndex);

      int u = intIndex(fromIndex);
      int arrayLength = array.length();
      if (u >= arrayLength)
         return -1;

      int possible = array.get(u) & (INT_MASK << fromIndex);

      while (true) {
         if (possible != 0) {
            return (u << ADDRESS_BITS_PER_INT) + Integer.numberOfTrailingZeros(possible);
         }
         if (++u == arrayLength) {
            return -1;
         }
         possible = array.get(u);
      }
   }
1185242
def clear_operations_touching(self,
                                  qubits: Iterable[ops.Qid],
                                  moment_indices: Iterable[int]):
        
        qubits = frozenset(qubits)
        for k in moment_indices:
            if 0 <= k < len(self._moments):
                self._moments[k] = self._moments[k].without_operations_touching(
                    qubits)
155155
def set_bit(bitmask, bit, is_on):
    
    bitshift = bit - 1
    if is_on:
        return bitmask | (1 << bitshift)
    return bitmask & (0xff & ~(1 << bitshift))
252196
public int deser(byte[] bytes, int start) throws IOException {
    int idx = 0;
    byte current;
    do {
      current = bytes[start+idx];
      ensureSpace(idx + 1);
      // The last bit must be clear
      bits[idx] = (byte) (current & ~1);
      idx++;
    } while ((current & 1) != 0);
    // clear the remaining bytes.
    for (int i = idx; i < bits.length; i++) {
      bits[i] = 0;
    }
    return idx;
  }
1150263
def clear(self):
        """"""

        if self.default_value is None:
            self.current_value = bytearray()
        else:
            self.current_value = bytearray(self.default_value)
677700
def _irshift(self, n):
        """"""
        assert 0 < n <= self.len
        self._prepend(Bits(n))
        self._truncateend(n)
        return self
592005
def _ilshift(self, n):
        """"""
        assert 0 < n <= self.len
        self._append(Bits(n))
        self._truncatestart(n)
        return self
975147
public void rewindNbytes(int N)
   {
      int bits = (N << 3);
	  totbit -= bits;
	  buf_byte_idx -= bits;	  
	  if (buf_byte_idx<0)
		  buf_byte_idx += BUFSIZE;
   }
1029833
def _truncateend(self, bits):
        """"""
        assert 0 <= bits <= self.len
        if not bits:
            return
        if bits == self.len:
            self._clear()
            return
        newlength_in_bytes = (self._offset + self.len - bits + 7) // 8
        self._setbytes_unsafe(self._datastore.getbyteslice(0, newlength_in_bytes), self.len - bits,
                              self._offset)
        assert self._assertsanity()
1238276
public void resetNextBits(final int pLength) {
		int max = currentBitIndex + pLength;
		while (currentBitIndex < max) {
			int mod = currentBitIndex % BYTE_SIZE;
			int length = Math.min(max - currentBitIndex, BYTE_SIZE - mod);
			byteTab[currentBitIndex / BYTE_SIZE] &= ~getMask(mod, length);
			currentBitIndex += length;
		}
	}
48138
def pad_hex(value, bit_size):
    
    value = remove_0x_prefix(value)
    return add_0x_prefix(value.zfill(int(bit_size / 4)))
516060
def shift_bits(buffer)
      buffer.slice!(0...1).unpack('b8').first.split('').map { |b| b == '1' }
    end