bit-wise operation unary ~ (invert)
bit-wise operation unary ~ (invert) Question: I’m a little confused by the ~ operator. Code goes below: a = 1 ~a #-2 b = 15 ~b #-16 How does ~ do work? I thought, ~a would be something like: 0001 = a 1110 = ~a why not? Asked By: Alcott || Source Answers: You are …