The tilde operator in C

The ~ operator is bitwise NOT, it inverts the bits in a binary number:

NOT 011100
  = 100011

Leave a Comment