In the C Programming language, operations can be performed on a bit level using bitwise operators. We use bitwise operators to manipulate data at its lowest bit level. bitwise operators works on each bit of the data.
Definition: A bitwise operator is an operator used to perform bitwise operations on bit patterns or binary numerals that involve the manipulation of individual bits.
Bitwise operators are used in communication stack.There are six bitwise operators are in C programming:
Bitwise Operators In C:
- Bitwise AND
- Bitwise OR
- Bitwise XOR
- Bitwise Complement
- Bitwise left shift
- Bitwise right shift
For more details:- bitwise operators .
Bitwise operators in C exercise examples:
1. Write a C program which perform bitwise AND operation.
2. Write a C program which perform bitwise OR operation.
3. Write a C program which perform bitwise XOR operation.
4. Write a C program which perform bitwise Compliment(~) operation.
5. Write a C program which perform bitwise left-shift(<<) operation.
6. Write a C program which perform bitwise right-shift(>>) operation.
7. C program to print given number is even or odd using bitwise operators.
Next: File Handling In C
No comments:
Post a Comment
If you have any doubts, please discuss here...👇