I've been studying c# and ran accross some familiar ground from my old work in c++. I never understood the reason for bitwise operators in a real application. I've never used them, and have never been in a reason to use them. I've been studying how they work; example below shows the shift bitwise operator. Could anyone furthur explain the point of bitwise operators, and/or elaborate on there use and how they work. Maybe I'm missing something in bitwise logic.
byte bitComp = 15; // bitComp = 15 = 00001111b
byte bresult = (byte) ~bitComp; // bresult = 240 = 11110000b
Heres an example for the ~complement bitwise operator
byte bitComp = 15; // bitComp = 15 = 00001111b
byte bresult = (byte) ~bitComp; // bresult = 240 = 11110000b