http://javabypatel.blogspot.in/search/label/Bit%20Manipulation
Bit Algorithms:
- Find the element that appears once
- Detect opposite signs
- Set bits in all numbers from 1 to n
- Swap bits
- Add two numbers
- Smallest of three
- A Boolean Array Puzzle
- Set bits in an (big) array
- Next higher number with same number of set bits
- Optimization Technique (Modulus)
- Add 1 to a number
- Multiply with 3.5
- Turn off the rightmost set bit
- Check for Power of 4
- Absolute value (abs) without branching
- Modulus division by a power-of-2-number
- Minimum or Maximum of two integers
- Rotate bits
- Find the two non-repeating elements in an array
- Number Occurring Odd Number of Times
- Check for Integer Overflow
- Little and Big Endian
- Reverse Bits of a Number
- Count set bits in an integer
- Number of bits to be flipped to convert A to B
- Next Power of 2
- Check if a Number is Multiple of 3
- Find parity
- Multiply with 7
- Find whether a no is power of two
- Position of rightmost set bit
- Binary representation of a given number
- Swap all odd and even bits
- Find position of the only set bit
- Karatsuba algorithm for fast multiplication
- How to swap two numbers without using a temporary variable?
- Check if a number is multiple of 9 using bitwise operators
- Swap two nibbles in a byte
- How to turn off a particular bit in a number?
- Check if binary representation of a number is palindrome
No comments:
Post a Comment