Fix for negative shift when attempting twos_complement() on zero