关于one's Complement和two's Complement的区别(1的补码和2的补码)(1步补码和2步补码)

Author: Bruce Liu Posted on: 2020-10-14 10:05:53 Visited: 425

one's Complement表示按位取反;
two's Complement表示按位取反后再加1

1的补码可以认为只有一步操作的补码,按位取反

2的补码可以认为有两步操作的补码,,按位取反后,再在最低位加1。

To get 1’s complement of a binary number, simply invert the given number.

To get 2’s complement of a binary number, simply invert the given number and add 1 to the least significant bit (LSB) of given result.




Tags:
补码 Complement

相关主题:

留言信息:

......期待您的留言!


增加留言、提问或者评论,不用注册,匿名提交,你提交的信息经过审核后才会显示:


© 2008-2022 CunYouLu存有录博客 村友录 存游录 鲁ICP备08005943号