Original Post
I want to thank everyone here for the great workshop. I have learned so much already! Here is my first question so far. From Page 71 - The ~ is the bitwise complement operator and is defined only for int, uint, long and ulong. The operator results in a integer of the same type in which all the bits have been flipped from 0 to 1 and from 1 - 0. What is a bitwise complement? I think I understand if I have an int and use the ~ operator that it will take the int and switch its binary representation from 0 to 1 and from 1 to 0 for each bit. Maybe I am missing the underlying knowledge of binary because I have no clue why I would use this and the result I would get form using it? Are there any examples that may enlighten me or a good tutorial on binary so I can further understand bit flipping and switching? An earlier post said shifting isn't really needed any longer, is this also true for flipping? Thanks for your time.