Bilingual edition: English is preserved and Chinese follows each unit. Terminology uses the confirmed v20260916 glossary; automated semantic review remains traceable.
中英双语版:英文原文完整保留,中文紧随对应单元;术语采用 v20260916 确认表,自动语义审校结果可追溯。

Signed Integer Representations

带符号整数表示法

Sign magnitude: the most significant bit is assigned to the algebraic sign.

符号幅度:最显著的位用于表示代数符号。

Offset binary: subtract half the largest possible number to get the value represented. I.e., you use half the largest number as the "zero" of the scale. For four bits:

偏移二进制:通过减去可能的最大数值的一半来得到所表示的值。即,将可能的最大数值的一半作为“零”点。对于四位来说:

2's Complement: negative integer is the complement of the positive integer plus one.

二进制补码:负整数是正整数加一的补码。

Other Integer Representations

其他整数表示法

Binary Coded Decimal (BCD or 8421 BCD): each individual digit of the decimal number is represented by a 4-bit binary number.

二进制编码十进制(BCD或8421 BCD):每个十进制数字由4位二进制数表示。

Excess-3: Add 3 to the number, then represent by 4-bit binary number.

Excess-3码:将数字加3,然后用4位二进制数表示。

4221 Code: Four bits represent 4,2,2,1 instead of 8,4,2,1

4221电码:四个二进制位分别代表4、2、2、1,而不是8、4、2、1

Gray Code: Starting at zero, make one change in the least significant possible bit to take you to the next state

格雷码:从零开始,每次只改变最低有效位,以得到下一个状态
Number Systems
数系
Index

Electronics concepts

Digital Circuits
索引 电子学概念 数字电路
 
HyperPhysics*****Electricity and magnetism
HyperPhysics ***** 电磁学
R Nave
Go Back
返回









"Sign Magnitude" Representation

符号幅度

The most significant bit of a binary number can be used to represent the sign of the number, using the other bits to represent its magnitude. It is a natural kind of representation of signed integers, but is not used much because it is awkward for doing arithmetic compared to a system like 2's complement. There are also two zeros, since + and - zero will have a different code.

二进制数的最高位可以用来表示数的符号,其余位用来表示其绝对值。这是一种自然的有符号整数表示方法,但因为与2的补码系统相比进行算术运算时显得笨拙,因此不常用。此外,还存在两个零,因为正零和负零会有不同的电码。
Number Systems
数系
Index

Electronics concepts

Digital Circuits
索引 电子学概念 数字电路
 
HyperPhysics*****Electricity and magnetism
HyperPhysics ***** 电磁学
R Nave
Go Back
返回










Offset Binary Representation

偏移二进制表示

One logical way to represent signed integers is to have enough range in binary numbers so that the zero can be offset to the middle of the range of positive binary numbers. Then the magnitude of a negative binary number can be simply subtracted from that zero point. This system has the advantage of a simple binary progression from negative to positive numbers. It is useful for binary counters and for A/D and D/A conversion. It is awkward for computation compared to the 2's complement representation.

用二进制数表示带符号整数的一种逻辑方法是,使二进制数的范围足够大,使得零可以偏移到正二进制数范围的中间。然后,负数的幅度可以简单地从这个零点减去。这种系统的优势在于从负数到正数的二进制进位过程简单。它对于二进制计数器和A/D及D/A转换很有用。与2的补码表示相比,它在计算上显得笨拙。

As a simple example, consider a 4-bit binary number with maximum number 15. Subtracting 7 gives the following representation:

作为一个简单的例子,考虑一个4位二进制数,最大值为15。减去7得到以下表示:
Number Systems
数系
Index

Electronics concepts

Digital Circuits
索引 电子学概念 数字电路
 
HyperPhysics*****Electricity and magnetism
HyperPhysics ***** 电磁学
R Nave
Go Back
返回












2's Complement Representation

二进制补码表示

This code is the most widely used code for integer computation. Positive numbers are represented by unsigned binary numbers. Negative numbers are formed by the following procedure.

此电码是整数计算中最广泛使用的电码。正数用无符号二进制数表示。负数则通过以下步骤形成。

To produce the number -5:

要得到数字-5:
1. Write the binary number for 5
将5写成二进制数
0101
2. Take the complement of it
取其补集
1010
3. Add 1
3. 加1
1011

This code has the advantage that arithmetic operations are straightforward. Subtraction is accomplished by binary addition of the 2's complement. Multiplication also can be carried out.

这种代码的优点在于算术运算较为直接。减法可以通过二进制的补码加法来实现。乘法也可以进行。
Number Systems
数系
Index

Electronics concepts

Digital Circuits
索引 电子学概念 数字电路
 
HyperPhysics*****Electricity and magnetism
HyperPhysics ***** 电磁学
R Nave
Go Back
返回