C Program to find whether a no is power of two – Bit Algorithm – Given a positive integer, write a function to find if it is a power of two or not.
modulus operator
4 Articles
4
Compute modulus division by a power of 2 number – Bit Algorithm – operators, where d is a power of 2 number.Let it bit from right is set in d. For getting n
Optimization Techniques | Set 1 (Modulus) – Bit Algorithm – The modulus operator (%) in various languages is costly operation. Ultimately every operator. must result in processor instructions. Some processors won’t have modulus instruction at hardware level
Add two numbers without using arithmetic operators – Bit Algorithm – Sum of two bits can be obtained by performing XOR (^) of the two bits.