Bitwise Operations and Masking in C Programming
- Mask means to block.
- Masking is the process by which , only required data is retained and the rest is masked (blocked)
- Masking can be done using Bitwise Operators
- Most Commonly Used Bitwise Operator is AND(&)
Num 1 : 1000 0001 1110 1011
& : 0000 0000 0000 1111
We get Result as :-
Num 1 : 0000 0000 0000 1011 // First 12 bits are Masked
Thus ....- Portion to be retained is ANDed with 1
- Portion to be Masked is ANDed with 0

0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email