Inverts the bit specified by the index.
index
void invertBit(int index) { this[index] = !this[index]; }