Sign-Magnitude Representation

COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

There are several alternative conventions used to represent negative as well as posi-
tive integers, all of which involve treating the most significant (leftmost) bit in the
word as a sign bit. If the sign bit is 0, the number is positive; if the sign bit is 1, the
number is negative.

There are several drawbacks to sign-magnitude representation. One is that addi-
tion and subtraction require a consideration of both the signs of the numbers and their
relative magnitudes to carry out the required operation. This should become clear in the
discussion in Section 10.3. Another drawback is that there are two representations of 0:

This is inconvenient because it is slightly more difficult to test for 0 (an operation
performed frequently on computers) than if there were a single representation.
Because of these drawbacks, sign-magnitude representation is rarely used in
implementing the integer portion of the ALU. Instead, the most common scheme is
twos complement representation.

原文地址:https://www.cnblogs.com/rsapaper/p/6225689.html