Reading about the integer promotion and integer conversion rank I found this link
1.If both operands have the same type, then no further conversion is needed.
2.Otherwise, if both operands have signed integer types or both have unsigned integer types, the operand with the type of lesser integer conversion rank is converted to the type of the operand with greater rank.
3.Otherwise, if the operand that has unsigned integer type has rank greater or equal to the rank of the type of the other operand, then the operand with signed integer type is converted to the type of the operand with unsigned integer type.
4.Otherwise, if the type of the operand with signed integer type can represent all of the values of the type of the operand with unsigned integer type, then the operand with unsigned integer type is converted to the type of the operand with signed integer type.
5.Otherwise, both operands are converted to the unsigned integer type corresponding to the type of the operand with signed integer type.
The points 1 2 3 are totally clear but I still not come up with example for the case 4 and 5. Can someone provide please an example concerning any implementation ?
As I know the integer conversion rank is:
_Bool < char < short < int < long < long long int
Whatever the size of bytes related to the types are equal or higher. Right?
Concerning the promotion or conversion from one type to the other. Are the bits added to the lowest type zero or 1 or the left extreme bit has effect on that ?
I want to know how is the process in the bits view especially for conversion.
For the integer promotion it can always conserve the value and the sign without a doubt.