Terry, the language reference also says:
"""
For the purpose of shift and mask operations, a binary representation is
assumed, and negative numbers are represented in a variant of 2's
complement which gives the illusion of an infinite string of sign bits
extending to the left.
"""
That explains every result you saw:
3 = ...000011
2 = ...000010
1 = ...000001
-3 = ...111101
2 = ...000010
-1 = ...111111
3 = ...000011
-2 = ...111110
-3 = ...111101
-3 = ...111101
-2 = ...111110
3 = ...000011
2 = ...000010
3 = ...000011
1 = ...000001
-2 = ...111110
3 = ...000011
-3 = ...111101
In every case, the result is simply the xor of the inputs viewed as
infinite bitstrings. And it works exactly the same way if you use |, &,
<<, >>, or unary ~.
It's true that CPython's longs are /implemented/ via sign-magnitude, but
that should never be visible in the result of any operation.