Bitwise Programming
- Write a program to check Least Significant Bit (LSB) of a number is set or not.
- Write a program to check Most Significant Bit (MSB) of a number is set or not.
- Write a program to get the nth bit of a number.
- Write a program to set the nth bit of a number.
- Write a program to clear the nth bit of a number.
- Write a program to toggle the nth bit of a number.
- Write a program to get the highest set bit of a number.
- Write a program to get the lowest set bit of a number.
- Write a program to count trailing zeros in a binary number.
- Write a program to count leading zeros in a binary number.
- Write a program to flip bits of a binary number using a bitwise operator.
- Write a program to count total zeros and ones in a binary number.
- Write a program to rotate bits of a given number.
- Write a program to convert decimal to binary number system using a bitwise operator.
- Write a program to swap two numbers using the bitwise operator.
- Write a program to check whether a number is even or odd using a bitwise operator.