1. ~ and - are separate operators. - negates, ~ does this: http://stackoverflow.com/a/7207406
2. Integers on computers are typically represented in two's complement notation: http://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html
3. Now that we know how all the parts work, we can put them together step by step:
~-0010 => ~1110 => 0001 -~0010 => -1101 => 0011
1. ~ and - are separate operators. - negates, ~ does this: http://stackoverflow.com/a/7207406
2. Integers on computers are typically represented in two's complement notation: http://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html
3. Now that we know how all the parts work, we can put them together step by step: