Bitwise Operation
Count 1 (GCC compiler)
Count leading or trailing zeros in position number (GCC compiler)
(also has -l and -ll for long and long long)
Check parity of a number (GCC compiler)
Parity of a number refers to whether it contains an odd or even number of 1-bits. This function returns true(1) if the number has odd parity else it returns false(0) for even parity.
Bitset
Return lowest bit of 1
Turn off the lowest bit that was set to 1
E.g., m=26 (11010) -> 24(11000)
Last updated