This commit is contained in:
krahets
2023-11-09 05:13:48 +08:00
parent 9701430089
commit 0105644232
83 changed files with 516 additions and 509 deletions

View File

@@ -10,7 +10,7 @@ comments: true
「ASCII 码」是最早出现的字符集,全称为“美国标准信息交换代码”。它使用 7 位二进制数(即一个字节的低 7 位)表示一个字符,最多能够表示 128 个不同的字符。如图 3-6 所示ASCII 码包括英文字母的大小写、数字 0 ~ 9、一些标点符号以及一些控制字符如换行符和制表符
![ASCII 码](character_encoding.assets/ascii_table.png)
![ASCII 码](character_encoding.assets/ascii_table.png){ class="animation-figure" }
<p align="center"> 图 3-6 &nbsp; ASCII 码 </p>
@@ -38,7 +38,7 @@ Unicode 是一种字符集标准,本质上是给每个字符分配一个编号
对于以上问题,**一种直接的解决方案是将所有字符存储为等长的编码**。如图 3-7 所示“Hello”中的每个字符占用 1 字节,“算法”中的每个字符占用 2 字节。我们可以通过高位填 0 将“Hello 算法”中的所有字符都编码为 2 字节长度。这样系统就可以每隔 2 字节解析一个字符,恢复出这个短语的内容了。
![Unicode 编码示例](character_encoding.assets/unicode_hello_algo.png)
![Unicode 编码示例](character_encoding.assets/unicode_hello_algo.png){ class="animation-figure" }
<p align="center"> 图 3-7 &nbsp; Unicode 编码示例 </p>
@@ -59,7 +59,7 @@ UTF-8 的编码规则并不复杂,分为以下两种情况。
之所以将 $10$ 当作校验符,是因为在 UTF-8 编码规则下,不可能有字符的最高两位是 $10$ 。这个结论可以用反证法来证明:假设一个字符的最高两位是 $10$ ,说明该字符的长度为 $1$ ,对应 ASCII 码。而 ASCII 码的最高位应该是 $0$ ,与假设矛盾。
![UTF-8 编码示例](character_encoding.assets/utf-8_hello_algo.png)
![UTF-8 编码示例](character_encoding.assets/utf-8_hello_algo.png){ class="animation-figure" }
<p align="center"> 图 3-8 &nbsp; UTF-8 编码示例 </p>

View File

@@ -15,7 +15,7 @@ comments: true
- **线性数据结构**:数组、链表、栈、队列、哈希表。
- **非线性数据结构**:树、堆、图、哈希表。
![线性与非线性数据结构](classification_of_data_structure.assets/classification_logic_structure.png)
![线性与非线性数据结构](classification_of_data_structure.assets/classification_logic_structure.png){ class="animation-figure" }
<p align="center"> 图 3-1 &nbsp; 线性与非线性数据结构 </p>
@@ -33,7 +33,7 @@ comments: true
**系统通过内存地址来访问目标位置的数据**。如图 3-2 所示,计算机根据特定规则为表格中的每个单元格分配编号,确保每个内存空间都有唯一的内存地址。有了这些地址,程序便可以访问内存中的数据。
![内存条、内存空间、内存地址](classification_of_data_structure.assets/computer_memory_location.png)
![内存条、内存空间、内存地址](classification_of_data_structure.assets/computer_memory_location.png){ class="animation-figure" }
<p align="center"> 图 3-2 &nbsp; 内存条、内存空间、内存地址 </p>
@@ -41,7 +41,7 @@ comments: true
如图 3-3 所示,**物理结构反映了数据在计算机内存中的存储方式**,可分为连续空间存储(数组)和分散空间存储(链表)。物理结构从底层决定了数据的访问、更新、增删等操作方法,同时在时间效率和空间效率方面呈现出互补的特点。
![连续空间存储与分散空间存储](classification_of_data_structure.assets/classification_phisical_structure.png)
![连续空间存储与分散空间存储](classification_of_data_structure.assets/classification_phisical_structure.png){ class="animation-figure" }
<p align="center"> 图 3-3 &nbsp; 连续空间存储与分散空间存储 </p>

View File

@@ -7,7 +7,7 @@ icon: material/shape-outline
<div class="center-table" markdown>
![数据结构](../assets/covers/chapter_data_structure.jpg){ width="600" }
![数据结构](../assets/covers/chapter_data_structure.jpg){ class="cover-image" }
</div>

View File

@@ -20,7 +20,7 @@ comments: true
图 3-4 展示了原码、反码和补码之间的转换方法。
![原码、反码与补码之间的相互转换](number_encoding.assets/1s_2s_complement.png)
![原码、反码与补码之间的相互转换](number_encoding.assets/1s_2s_complement.png){ class="animation-figure" }
<p align="center"> 图 3-4 &nbsp; 原码、反码与补码之间的相互转换 </p>
@@ -129,7 +129,7 @@ $$
\end{aligned}
$$
![IEEE 754 标准下的 float 的计算示例](number_encoding.assets/ieee_754_float.png)
![IEEE 754 标准下的 float 的计算示例](number_encoding.assets/ieee_754_float.png){ class="animation-figure" }
<p align="center"> 图 3-5 &nbsp; IEEE 754 标准下的 float 的计算示例 </p>