title: Confusion on twos compliment in python
body: <p>So I tried the following in the python shell:</p>
  
  <pre><code>&gt;&gt;&gt; x = -1
  &gt;&gt;&gt; x &lt; 0
  True
  &gt;&gt;&gt; x = -x
  &gt;&gt;&gt; x ^= 0xffffffff
  &gt;&gt;&gt; x += 1
  &gt;&gt;&gt; x &lt; 0
  False
  </code></pre>
  
  <p>So if i have a number thats initially negative, and i negate it and take the twos compliment, shouldnt it be negative again? why does python think the number is positive?</p>