3 ms·
Having 1000...0001 represent -1 would be sign-magnitude representation. Having 1111...1111 be -1 is two's complement. Computers usually use two's complement for
by FreeFull 3y ago
Having 1000...0001 represent -1 would be sign-magnitude representation. Having 1111...1111 be -1 is two's complement. Computers usually use two's complement for integers, because it makes addition and multiplication really easy to implement. Floating point actually is closer to sign-magnitude, though.
- yencabulator 3y agoAnd sign-magnitude representation would lead to +0 and -0 being two different bit patterns, which would mean == on integers couldn't be a direct byte comparison anymore. Undesirable.