4 ms·
This is a technicality. Leftmost bit still denotes a sign and modulo of the number is still capped at n-1 bits.
by xentronium 14y ago
This is a technicality. Leftmost bit still denotes a sign and modulo of the number is still capped at n-1 bits.
- MichaelSalib 14y agoThe differences between the representations matter. In 2s complement, -INT_MIN is not INT_MAX; in fact, -INT_MIN is undefined and a C compiler is justified in deleting all your code if you ever cause it to calculate -INT_MIN. I tell you what: if you think modern architectures use an explicit sign bit to represent integers, how do you explain the fact that INT_MAX+1==-INT_MIN? If there's a sign bit, how could you possibly represent more negative integers than positive integers?