一補數

来自EverybodyWiki Bios & Wiki
跳转至:导航、​搜索

This article "一補數" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:一補數. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one. 脚本错误:没有“Message box”这个模块。 脚本错误:没有“NoteTA”这个模块。二进制数反转,得到的数即为原二进制的一補數(ones' complement)。若某一位为0,则使其变为1,反之亦然。

一个数的反码在很多算术运算中的表现与这个数的相反数很相似,此特性可使加法电路同时可以运算减法。然而,由于反码中存在多余的负零和其它问题,反码并未像补码一样被广泛应用。

表示方式[编辑]

例如,+3是0011,用一補碼表示-3便是1100。

下表列出了4-bit二進數所能表示的整數。

二進數 無符號 符號位元 一補碼
0000 0 0 0
0001 1 1 1
0010 2 2 2
0011 3 3 3
0100 4 4 4
0101 5 5 5
0110 6 6 6
0111 7 7 7
1000 8 -0 -7
1001 9 -1 -6
1010 10 -2 -5
1011 11 -3 -4
1100 12 -4 -3
1101 13 -5 -2
1110 14 -6 -1
1111 15 -7 -0

相关条目[编辑]

This article "一補數" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:一補數. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.

Page kept on Wikipedia This page exists already on Wikipedia.