Bit Wise Operators
- Bitwise AND operator
&
- Bitwise OR operator
|
- Bitwise XOR operator
^
- Bitwise complement operator
~
- Bitwise left shift operator
<<
- Bitwise right shift operator
>>
- Write a C program to check the Least Significant Bit (LSB) of a number is set or not.
- Write a C program to check Most Significant Bit (MSB) of a number is set or not.
- Write a C program to get an nth bit of a number.
- Write a C program to set the nth bit of a number.
- Write a C program to clear nth bit of a number.
- Write a C program to toggle nth bit of a number.
- Write a C program to get the highest set bit of a number.
- Write a C program to get the lowest set bit of a number.
- Write a C program to count trailing zeros in a binary number.
- Write a C program to count leading zeros in a binary number.
- Write a C program to flip bits of a binary number using bitwise operator.
- Write a C program to count total zeros and ones in a binary number.
- Write a C program to rotate bits of a given number.
- Write a C program to convert decimal to binary number system using a bitwise operator.
- Write a C program to swap two numbers using bitwise operator.
- Write a C program to check whether a number is even or odd using a bitwise operator.
No comments