List of utility methods to do Bit Clean
byte | clearBit(byte b, int i) clear Bit return (byte) logicalAND(b, logicalNOT(bitMask(i))); |
byte | clearBit(byte input, int bit) clear Bit return (byte) (input & ~BYTE[bit]); |
byte | clearBit(byte v, int position) Returns v, with the bit at position set to zero. return (byte) clearBit((int) v, position); |
int | clearBit(int bits, int index) Sets bit at index in bits to zero. return bits & ~(1 << index);
|
int | clearBit(int flag, int i) clear Bit int bit = pow2(i); return (flag & bit) == 0 ? flag : flag ^ bit; |
int | clearBit(int n, int bitPosition) Clears bit position in a copy of the integer and returns it int number = n; int bitNumber = ~(1 << (bitPosition - 1)); return (number & bitNumber); |
int | clearBit(int value, int bit) Clear the bit within the int. assert bit >= 0 && bit < 16; return value & ~bitMask(bit); |
int | clearBit(int value, int bit) Clears the specified bit from the value return value & ~bit;
|
int | clearBit(int value, int bitIndex) clear Bit assert (bitIndex >= 0); assert (bitIndex <= 31); int bit = pow2(bitIndex); return (value & bit) == 0 ? value : value ^ bit; |
int | clearBit(int value, int index) Clears a bit of a value at a given position. return value & (value ^ (1 << index));
|