Convert an unsigned integer to a signed integer.

        :param v: The unsigned integer
        :param bits: How many bits this integer should be
        :return: The converted signed integer

def _unsigned_to_signed(v, bits):
        """
        Convert an unsigned integer to a signed integer.

        :param v: The unsigned integer
        :param bits: How many bits this integer should be
        :return: The converted signed integer
        """
        if StridedInterval._is_msb_zero(v, bits):
            return v
        else:
            return -(2 ** bits - v)