signed 1 (as byte) in bits: 00000001
unsigned 1 in bits: 00000001
signed -1 in bits: 10000001 (or 1 1111111, just details)
unsigned -1 in bits: no valid representation (10000001 is 129)
if you want safely compare signed and unsigned variables, than you have two ways:
1) take in account signs and manually compare them (e. g. isSignedLess = (signed < 0) || ((unsigned <= max_signed) && (signed < unsigned))
)
2) cast both to bigger singed (i. e. signed long long) and than compare them (signed long long can store all diapason of signed/unsigned int's)
As you can see in comments, both ways are kinda tricky. Just don't mix signed and unsigned wherever you can. It's possible in 99% cases. In last 1% cases you really need to know what you doing (e. g. often had to use signed indexes with vectors, but size() - unsigned, so I ask myself hundred time "can this vector reach MAX_INT or not? have I to do more complex code or it's ok for this task?").