I strongly suspect that the negate_twos_complement calls are
unnecessary, but I'm not at all sure what the correct way to implement
this is for negative numbers. However, it should be reasonably rare to
use these bit operations on negative numbers, so this works for now.
I strongly suspect that the
negate_twos_complement
calls are unnecessary, but I'm not at all sure what the correct way to implement this is for negative numbers. However, it should be reasonably rare to use these bit operations on negative numbers, so this works for now.