3 ms·
What the author is saying about remembering the math vs the illustration took me a second to get. The discs should probably be rotated slightly to make it more
by ziml77 3y ago
What the author is saying about remembering the math vs the illustration took me a second to get. The discs should probably be rotated slightly to make it more obvious that the axis you're flipping over when you take the bitwise not rests between -1 and 0, not vertically through 0 itself. When you look at it like that, it's much easier to see that whenever you flip across that axis, you end up needing to take a step to the right whether you're converting negative to positive or positive to negative.
And the reason why it's the same rightward movement for going from negative to positive and from positive to negative is because a move to the right on one side is effectively a move to the left on the other side. I see it in my head as there being a phantom mirrored dot always indicating where you will end up when you flip across the axis.