Data in the memory (RAM) is organized as a sequence of bytes. Each byte is a group of eight consecutive bits. Bitwise operators are useful when we need to perform actions on bits of the data.
C supports six bitwise operators.
- Bitwise AND operator
&
- Bitwise OR operator
|
- Bitwise XOR operator
^
- Bitwise complement operator
~
- Bitwise left shift operator
<<
- Bitwise right shift operator
>>
This exercises focuses on mastering bitwise operators. After this exercise you will surely gain some confidence using bitwise operators.
Read more