code: public void flipBit(int index)
      {
          assertValidIndex(index);
          int word = index / WORD_LENGTH;
          int offset = index % WORD_LENGTH;
          data[word] ^= (1 << offset);
      }
docs: Inverts the value of the bit at the specified index.
  @param index The bit to flip (0 is the least-significant bit).
  @throws IndexOutOfBoundsException If the specified index is not a bit
  position in this bit string.