diff --git a/chapter_data_structure/number_encoding/index.html b/chapter_data_structure/number_encoding/index.html index 247bd0154..0560fbb76 100644 --- a/chapter_data_structure/number_encoding/index.html +++ b/chapter_data_structure/number_encoding/index.html @@ -852,7 +852,7 @@
  • - 3.3.1   原码、反码和补码 + 3.3.1   整数编码
  • @@ -3242,7 +3242,7 @@
  • - 3.3.1   原码、反码和补码 + 3.3.1   整数编码
  • @@ -3314,7 +3314,7 @@

    Note

    在本书中,标题带有的 * 符号的是选读章节。如果你时间有限或感到理解困难,可以先跳过,等学完必读章节后再单独攻克。

    -

    3.3.1   原码、反码和补码

    +

    3.3.1   整数编码

    在上一节的表格中我们发现,所有整数类型能够表示的负数都比正数多一个,例如 byte 的取值范围是 \([-128, 127]\) 。这个现象比较反直觉,它的内在原因涉及到原码、反码、补码的相关知识。

    首先需要指出,数字是以“补码”的形式存储在计算机中的。在分析这样做的原因之前,我们首先给出三者的定义。