zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    几道cf水题
    cf水题
    一道cf水题
    c++list用法
    c++map用法
    c++ vector常见用法
    c++string,常见用法总结
    复变函数考试后的反思
    [FZYZOJ 1204] 零和问题
    [FZYZOJ 1202] 金坷垃
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6225689.html
Copyright © 2011-2022 走看看