Low Level Class Methods in Java
1. Bitwise and integer operations Integer & Long (Also in Long with long versions) bitCount(int x) — popcount (Hamming weight) numberOfLeadingZeros(int x) numberOfTrailingZeros(int x) highestOneBit(int x) — isolate MSB lowestOneBit(int x) — isolate LSB rotateLeft(int x, int n) rotateRight(int x, int n) reverse(int x) — bit reversal reverseBytes(int x) — byte swap compareUnsigned(int x, int y) divideUnsigned(int dividend, int divisor) remainderUnsigned(int dividend, int divisor) toUnsignedLong(int x) Const: BYTES , SIZE 2. Unsigned helpers Byte.toUnsignedInt(byte b) Short.toUnsignedInt(short s) Integer.toUnsignedLong(int i) Integer.compareUnsigned(...) , Integer.divideUnsigned(...) , Integer.remainderUnsigned(...) Same for Long ( compareUnsigned , divideUnsigned , remainderUnsigned ) 3. IEEE-754 float/double bit manipulation Float floatToIntBits(float f) — normalizes NaN floatToRawIntBits(floa...