2 ms·
This is a joke. For those who didn't get the joke: 1. ~ and - are separate operators. - negates, ~ does this: http://stackoverflow.com/a/7207406 http://stackov
by copsarebastards 11y ago
This is a joke. For those who didn't get the joke:
1. ~ and - are separate operators. - negates, ~ does this: http://stackoverflow.com/a/7207406 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 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