Hi guys,
I'm having incorrect results using
Java's ~ operator.
Here's the code I'm using:
If n == -124, the result I get is -125, after the complement.
I was expecting (and should be) positive 131.
124 -> 0111 1100
invert: 1000 0011 (which is 131)
Please help. I don't know what I'm missing here.