do code signed/unsigned invariant