Redian新闻
>
现代计算机中的负数都是怎么表示的
avatar
现代计算机中的负数都是怎么表示的# JobHunting - 待字闺中
t*h
1
一直不太清楚 wiki上列举了N种方式 哪位打牛给说说?
avatar
c*a
2
你说的是binary? 1是负数, 这种?
avatar
t*h
3
en

【在 c*****a 的大作中提到】
: 你说的是binary? 1是负数, 这种?
avatar
c*p
4
Two's complement 居多。比如: x86, amd64, sparc都用 Two's complement.
http://en.wikipedia.org/wiki/Two's_complement
The two's-complement system has the advantage that the fundamental
arithmetic operations of addition, subtraction, and multiplication are
identical to those for unsigned binary numbers (as long as the inputs are
represented in the same number of bits and any overflow beyond those bits is
discarded from the result). This property makes the system both simpler to
implement and capable of easily handling higher precision arithmetic. Also,
zero has only a single representation, obviating the subtleties associated
with negative zero, which exists in ones'-complement systems.

【在 t*********h 的大作中提到】
: 一直不太清楚 wiki上列举了N种方式 哪位打牛给说说?
avatar
g*e
5
integer use two's comp
floating number use a bit to indicate pos/neg
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。