In this series, we'll try to compile a list of tips and tricks that are useful for performing bitwise operation.
C code to check if an integer is a power of 2 or not in a single line
Find Position of the only Set Bit
C program to count bits set in an integer
Check if the 20th bit of a 32 bit integer is on or off?
Check If an Integer's Bit Representation Is a Palindrome
Implement Add,Subtract,Multiplication,Division Using Bit Manipulation
How to add two numbers without using the plus operator?
Give a fast way to multiply a number by 7
Reverse a String using bits
Bit Swaps
Swapping 2 numbers without a temporary
To swap the two nibbles in a byte
To determine whether machine is Little-Endian and Big-Endian?
Checking if a bit is on or off without affecting other bits
Turning a bit off without affecting other bits
Turning a bit off without affecting other bits
C code to check if an integer is a power of 2 or not in a single line
Find Position of the only Set Bit
C program to count bits set in an integer
Check if the 20th bit of a 32 bit integer is on or off?
Check If an Integer's Bit Representation Is a Palindrome
Implement Add,Subtract,Multiplication,Division Using Bit Manipulation
How to add two numbers without using the plus operator?
Give a fast way to multiply a number by 7
Reverse a String using bits
Bit Swaps
Swapping 2 numbers without a temporary
To swap the two nibbles in a byte
To determine whether machine is Little-Endian and Big-Endian?
0 comments:
Post a Comment