[
    {
        "type": "text",
        "text": "进位计数制",
        "bbox": [
            144,
            148,
            240,
            164
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "基数 R：允许使用的基本数码个数",
        "bbox": [
            144,
            167,
            413,
            183
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": " 权 Wi：权也称位权，第 i 位上的数码的权重",
        "bbox": [
            146,
            186,
            502,
            200
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "值，即权与数码所处的位置 i 有关",
        "bbox": [
            146,
            204,
            410,
            219
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "$\\mathbf { \\nabla } \\cdot \\mathbf { \\vec { w } } \\mathbf { \\vec { i } } = \\mathbf { \\vec { R } }$ ",
        "bbox": [
            147,
            224,
            221,
            237
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "假设任意数值N用R进制数来表示：",
        "text_level": 1,
        "bbox": [
            189,
            249,
            648,
            272
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "N= (Dm-1Dm-2...D。.D.1D-2...D-k） R权重 Di：基本符号， $\\mathsf { D } _ { \\mathsf { i } } \\in [ \\mathsf { 0 } ,$ R-1],i=-k,-k+1, .….，m-1；小数点在D和D之间",
        "bbox": [
            144,
            280,
            712,
            357
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "数值N的实际值为：加权求和",
        "text_level": 1,
        "bbox": [
            189,
            363,
            591,
            386
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "进1 m-1六进制？ 十进制 8N=∑(Di×R')",
        "bbox": [
            144,
            388,
            685,
            468
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "X 何谓十进制、二进制、八进制、十六进制？",
        "text_level": 1,
        "bbox": [
            196,
            483,
            756,
            507
        ],
        "page_idx": 0
    },
    {
        "type": "table",
        "img_path": "images/da1bad6da64d52421be32b95d9695947bbeed1cb3852e71178dff094c1fe848e.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>进制</td><td>基数R</td><td>权Wi</td><td>数码符号</td></tr><tr><td>十进制</td><td>R=10</td><td>10i</td><td>0~9</td></tr><tr><td>二进制</td><td>R=2</td><td>2i</td><td>0、1</td></tr><tr><td>八进制</td><td>R=8</td><td>8i</td><td>0~7</td></tr><tr><td>十六进制</td><td>R=16</td><td>16i</td><td>0~9、A~F</td></tr></table>",
        "bbox": [
            184,
            510,
            694,
            670
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "二进制 八进制",
        "text_level": 1,
        "bbox": [
            146,
            703,
            275,
            719
        ],
        "page_idx": 0
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 以小数点为中心分别向两边分组，每三位一组，写出对应的八进制数字（不够位数则在两边加0补足3位 ）",
            " 二进制 十六进制",
            " 以小数点为中心分别向两边分组，每四位一组，写出对应的十六进制符号（不够位数则在两边加0补足4位 ）",
            " 八进制 二进制",
            " 将每位八进制数展开为3位二进制数，整数的最高位0和小数的最低位0可以略去",
            " 十六进制 二进制",
            " 将每位十六进制数展开为4位二进制数，整数的最高位0和小数的最低位0可"
        ],
        "bbox": [
            144,
            722,
            761,
            904
        ],
        "page_idx": 0
    },
    {
        "type": "text",
        "text": "以略去",
        "text_level": 1,
        "bbox": [
            147,
            93,
            203,
            107
        ],
        "page_idx": 1
    },
    {
        "type": "text",
        "text": "如何在计算机内使用二进制来表示十进制数据？",
        "bbox": [
            144,
            130,
            512,
            145
        ],
        "page_idx": 1
    },
    {
        "type": "text",
        "text": "十进制数的编码",
        "bbox": [
            147,
            148,
            275,
            162
        ],
        "page_idx": 1
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "BCD（Binary Coded Decimal）码：",
            " 使用二进制来编码十进制数字 $\\pmb { 0 } \\sim \\pmb { 9 }$ ",
            "编码方法：",
            " 一般使用 4 位二进制编码来表示 1 位十进制数字",
            " 在 16 个编码中选用 10 个来表示数字 $\\pmb { 0 } \\sim \\pmb { 9 }$ ",
            " 不同的选择构成不同的 BCD 码",
            "分类：",
            " 有权码：编码的每一位都有固定的权值，加权求和的值即是表示的十进制数字。如 8421 码、2421 码、5211 码、4311 码、84 -2-1 码等",
            " 无权码：编码的每一位并没有固定的权，主要包括格雷码、余 3 码等十进制数串的表示方法"
        ],
        "bbox": [
            146,
            168,
            727,
            367
        ],
        "page_idx": 1
    },
    {
        "type": "text",
        "text": "数值数据：用于表示数的大小，其值确定，可与数轴上确切的点对应",
        "bbox": [
            146,
            370,
            680,
            386
        ],
        "page_idx": 1
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 非数值数据：没有值大小的概念，表示字符、汉字、图像、声音等信息",
            " 计算机中如何表示数值数据？数值数据的格式要素，必须要考虑三点"
        ],
        "bbox": [
            147,
            390,
            717,
            423
        ],
        "page_idx": 1
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 第一，符号如何表示？",
            " 第二，小数点如何表示？",
            " 第三，二进制数字如何排列来表示某个数值？",
            " 机器数：数值数据在计算机中的二进制表示形式。",
            " 机器数的符号位必须被数值化为二进制 0 和 1",
            " 机器数的小数点用隐含规定的方式来表达",
            " 表示的数值范围受计算机字长的限制",
            " 编码方法：不同的排列方式，常见的有原码、反码、补码、移码。",
            " 真值：机器数真正表示的数值数据",
            " 书写： $+ /$ －符号 数值（二进制或十进制）"
        ],
        "bbox": [
            147,
            426,
            663,
            627
        ],
        "page_idx": 1
    },
    {
        "type": "text",
        "text": "计算机中参与运算的数值数据有两种：",
        "bbox": [
            146,
            649,
            440,
            664
        ],
        "page_idx": 1
    },
    {
        "type": "text",
        "text": " 无符号数据（Unsigned ）：所有的二进制数据位数均用来表示数值本身，没有正负之分",
        "bbox": [
            146,
            668,
            734,
            701
        ],
        "page_idx": 1
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 带符号数据（Signed）：则其二进制数据位，包括符号位和数值位",
            " 当机器字长相同时，无符号数和有符号数的表示范围是不同的",
            "计算机中：小数点的表示方法？",
            " 计算机中没有专用的部件用来表示小数点",
            " 机器数中，小数点及其位置是隐含规定的",
            " 有两种隐含方式：定点和浮点"
        ],
        "bbox": [
            147,
            705,
            734,
            812
        ],
        "page_idx": 1
    },
    {
        "type": "text",
        "text": "定点机器数（Fixed Point）：小数点的位置是固定不变的，两种位置：",
        "bbox": [
            144,
            816,
            695,
            831
        ],
        "page_idx": 1
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 定点小数：纯小数，隐含固定在符号位Xs（最高位）之后，整数位是符号位",
            " 定点整数：纯整数，小数点隐含固定在最低位之后，最高位为符号位Xs"
        ],
        "bbox": [
            147,
            835,
            463,
            904
        ],
        "page_idx": 1
    },
    {
        "type": "image",
        "img_path": "images/c7b139b89222151266e017727943407c6624042609160e115030648370c50579.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            156,
            124,
            473,
            290
        ],
        "page_idx": 2
    },
    {
        "type": "text",
        "text": "浮点机器数：将实数数值大小表示成科学计数法形式",
        "bbox": [
            144,
            332,
            557,
            350
        ],
        "page_idx": 2
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 浮点数 N 由三部分构成：",
            " 阶码的底 R：隐含表示，一般约定为 2、8 或 16",
            " 尾数M：系数，为定点小数",
            " 阶码 E：R 的指数，为定点整数",
            " 对尾数所表示的定点小数，进行按比例放大（阶码为正数）或者按比例缩小（阶码为负数），数据真值的小数点位置是浮动的——位置由阶码规定"
        ],
        "bbox": [
            144,
            351,
            769,
            461
        ],
        "page_idx": 2
    },
    {
        "type": "image",
        "img_path": "images/1daf5d1e2f93f95400319c82fbc9d2ae791ee6d59e6b25c4acc80a7508d40b5d.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            194,
            502,
            1000,
            627
        ],
        "page_idx": 2
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 负精度-δ：机器数在数轴上最靠近原点0的负数，计算机能表示的最大负数",
            " 正精度δ：机器数在数轴上最靠近原点0的正数，计算机能表示的最小正数绝对值称为精度δ或分辨率，代表了机器数所能表示的绝对值最小的非零值",
            " 机器数的表示范围：[最小数，最大负数]、0、[最小正数，最大数]",
            " 最大数和和最小数：取决于机器数的编码方式、位数和格式"
        ],
        "bbox": [
            144,
            667,
            754,
            757
        ],
        "page_idx": 2
    },
    {
        "type": "image",
        "img_path": "images/b6134e5eaca7a911410e0badcaa00f52a9436d482092a19623417c4bb70ff044.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            156,
            766,
            531,
            848
        ],
        "page_idx": 2
    },
    {
        "type": "text",
        "text": "下溢：位于最大负数和最小正数之间的数据（除 0 外），机器无法表示。",
        "bbox": [
            144,
            871,
            702,
            887
        ],
        "page_idx": 2
    },
    {
        "type": "text",
        "text": " 处理：计算机直接将其视为机器零。",
        "bbox": [
            146,
            890,
            435,
            904
        ],
        "page_idx": 2
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 上溢：当一个数据大于最大（正）数，或者小于最小（负）数时，机器也无法表示，称为上溢，上溢又称溢出。",
            " 处理：计算机置溢出标志位，或者报警。 "
        ],
        "bbox": [
            144,
            93,
            771,
            145
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "原码表示法",
        "text_level": 1,
        "bbox": [
            147,
            149,
            238,
            162
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "数学定义：真值与编码之间的数学关系",
        "text_level": 1,
        "bbox": [
            144,
            178,
            443,
            193
        ],
        "page_idx": 3
    },
    {
        "type": "image",
        "img_path": "images/1671e19ddf9f093cf00cf7c15db5550fd45f081c57f5b8e26a12151e29b38513.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            201,
            195,
            544,
            307
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "翻数",
        "text_level": 1,
        "bbox": [
            179,
            357,
            218,
            388
        ],
        "page_idx": 3
    },
    {
        "type": "image",
        "img_path": "images/c815c6dc8826c731955012e56a7cb6cd015ca599083efa4e0ef91814247f3469.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            230,
            349,
            416,
            393
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "业数",
        "text_level": 1,
        "bbox": [
            470,
            357,
            507,
            388
        ],
        "page_idx": 3
    },
    {
        "type": "image",
        "img_path": "images/26ff03a141ea9e96a1420fe0eb7111445ecdcbf59b2601a1c00de37b3c4ddc8c.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            515,
            350,
            697,
            395
        ],
        "page_idx": 3
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "：-（--u）X--",
            "//：-（Su-」）XSu "
        ],
        "bbox": [
            163,
            406,
            487,
            442
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "",
        "bbox": [
            507,
            407,
            633,
            438
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "、（5）淌围： $\\nleftarrow$ ",
        "bbox": [
            144,
            445,
            678,
            460
        ],
        "page_idx": 3
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 使用原码进行加减乘除运算：规则类似于真值的加减乘除运算",
            " 符号位单独处理，不能参加运算，参加运算的是绝对值",
            " 加减运算：",
            "• 根据符号位决定进行的是绝对值的加还是减",
            "• 进行绝对值的加减运算",
            "• 根据绝对值的大小决定结果（和或者差）的符号"
        ],
        "bbox": [
            146,
            464,
            640,
            571
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "表示方法：最高位为符号位，其他位为数值位",
        "bbox": [
            144,
            630,
            504,
            645
        ],
        "page_idx": 3
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 符号位：0－正数，1－负数",
            " 数值位：与绝对值相同 "
        ],
        "bbox": [
            146,
            649,
            378,
            682
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "“”和””只用于助记，在计算机中并无专用部件来表示",
        "text_level": 1,
        "bbox": [
            156,
            703,
            376,
            765
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "对于定点整数：",
        "text_level": 1,
        "bbox": [
            146,
            778,
            263,
            793
        ],
        "page_idx": 3
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 若 ${ \\bf X } = + { \\bf X } 1 { \\bf X } 2$ ……Xn，则[X]原= 0,X1X2 ……Xn",
            " 若 $\\mathbf { \\lambda } \\mathbf { x } ( = \\mathbf { - }$ X1X2 ……Xn，则[X]原 $\\varXi$ 1,X1X2 ……Xn 。"
        ],
        "bbox": [
            146,
            797,
            539,
            831
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": " 对于定点小数：",
        "bbox": [
            147,
            834,
            285,
            848
        ],
        "page_idx": 3
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 若 X=+0.X1X2 ……Xn，则[X]原 $\\backslash =$ 0.X1X2 ……Xn",
            " 若 $\\mathbf { \\lambda } \\mathbf { x } ( = \\mathbf { - }$ 0.X1X2 ……Xn，则[X]原 $\\varXi$ 1.X1X2 ……Xn"
        ],
        "bbox": [
            146,
            853,
            542,
            887
        ],
        "page_idx": 3
    },
    {
        "type": "text",
        "text": "补码",
        "text_level": 1,
        "bbox": [
            146,
            93,
            188,
            109
        ],
        "page_idx": 4
    },
    {
        "type": "image",
        "img_path": "images/811671a79ae1be5c45f4f715ff2f2fb25f3fcc69b175fff61442343d1a530415.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            178,
            134,
            670,
            233
        ],
        "page_idx": 4
    },
    {
        "type": "text",
        "text": "2、表示方法：最高位为符号位，其他位为数值位。",
        "bbox": [
            144,
            259,
            539,
            275
        ],
        "page_idx": 4
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 符号位：0－正数，1－负数。",
            " 数值位：正数时，与绝对值相同；负数时，为绝对值取反后，末位加 1。"
        ],
        "bbox": [
            146,
            279,
            712,
            312
        ],
        "page_idx": 4
    },
    {
        "type": "image",
        "img_path": "images/ffe44f4fd0268aa31595488035281a89922feca95c9661470ec0bbee0d1405be.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            164,
            319,
            442,
            399
        ],
        "page_idx": 4
    },
    {
        "type": "text",
        "text": "真值=加权求和",
        "text_level": 1,
        "bbox": [
            189,
            412,
            386,
            435
        ],
        "page_idx": 4
    },
    {
        "type": "text",
        "text": "对于定点整数:",
        "bbox": [
            149,
            451,
            284,
            468
        ],
        "page_idx": 4
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "■ 若X=+XX..X， 则[X]补= 0.,X.X..Xn",
            "$\\not \\equiv \\emptyset \\mathbb { X } = - \\mathbb { X } _ { 1 } \\mathbb { X } _ { 2 } . . . . . . \\mathbb { X } _ { n } , \\mathbb { M } \\subseteq \\mathbb { X } _ { 1 } = \\ 1 , \\overline { { X _ { 1 } } } \\overline { { X _ { 2 } } } . . . . . . . \\ \\overline { { X _ { n } } } \\ + \\ 1$ "
        ],
        "bbox": [
            174,
            476,
            584,
            521
        ],
        "page_idx": 4
    },
    {
        "type": "text",
        "text": "对于定点小数：",
        "bbox": [
            149,
            530,
            284,
            545
        ],
        "page_idx": 4
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\begin{array} { r } { \\dot { \\Xi } \\mathsf { X } = + 0 . \\mathsf { X } _ { 1 } \\mathsf { X } _ { 2 } . . . . . . . \\mathsf { X } _ { \\mathrm { n } } \\ , \\perp \\sharp [ \\mathsf { X } ] _ { \\sharp \\flat } = 0 . \\mathsf { X } _ { 1 } \\mathsf { X } _ { 2 } . . . . . . . \\mathsf { X } _ { \\mathrm { n } } } \\end{array}$ ${ \\bf \\omega } = + { \\bf 0 }$ ",
            "■ 若X=-0. $\\mathbf { X } _ { 1 } \\mathbf { X } _ { 2 } . . . . . . \\mathbf { X } _ { n }$ ，则 $[ \\mathsf { X } ] _ { * \\mathsf { h } } = 1 .$ . X X... X +.....1."
        ],
        "bbox": [
            174,
            555,
            692,
            600
        ],
        "page_idx": 4
    },
    {
        "type": "text",
        "text": "0的表示：0 的补码表示形式是唯一的，即分别按照正数和负数表示均一致，为全零。",
        "bbox": [
            144,
            630,
            707,
            664
        ],
        "page_idx": 4
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " $[ + 0 ]$ 补＝ 00…0 [-0]补 $= 0 0 . . . 0$ ",
            " （2）表示范围：对于 $\\mathsf { n } + \\mathsf { 1 }$ 位补码机器数 X，它所能表示的数据范围为：",
            " 定点整数： $- 2 \\mathsf { n } { \\mathsf { \\leq } } \\mathsf { X } \\leq 2 \\mathsf { n } - 1$ ",
            " 定点小数： $- 1 \\leq x \\leq 1 - 2 - \\mathsf { n }$ "
        ],
        "bbox": [
            146,
            668,
            717,
            738
        ],
        "page_idx": 4
    },
    {
        "type": "text",
        "text": "（3）补码运算",
        "text_level": 1,
        "bbox": [
            156,
            741,
            267,
            756
        ],
        "page_idx": 4
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 补码的符号位同数值位一起参加运算 ",
            " 可以将减法转化为加法",
            " 简化了运算器的结构"
        ],
        "bbox": [
            146,
            760,
            445,
            812
        ],
        "page_idx": 4
    },
    {
        "type": "text",
        "text": " 计算机中的整型数据（int）均用补码来表示反码",
        "bbox": [
            146,
            816,
            512,
            850
        ],
        "page_idx": 4
    },
    {
        "type": "text",
        "text": "定点整数",
        "text_level": 1,
        "bbox": [
            156,
            107,
            208,
            148
        ],
        "page_idx": 5
    },
    {
        "type": "equation",
        "text": "$$\n[ \\mathbf {X} ] _ {\\text {反}} = \\left\\{ \\begin{array}{l l} \\mathbf {X} & \\mathbf {X} \\geq 0 \\\\ 2 ^ {n + 1} - 1 + \\mathbf {X} & \\mathbf {X} \\leq 0 \\end{array} \\right.\n$$",
        "text_format": "latex",
        "bbox": [
            221,
            99,
            534,
            162
        ],
        "page_idx": 5
    },
    {
        "type": "equation",
        "text": "$$\n(\\mod (2 ^ {n + 1} - 1))\n$$",
        "text_format": "latex",
        "bbox": [
            289,
            168,
            492,
            192
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "定点小数",
        "text_level": 1,
        "bbox": [
            603,
            112,
            655,
            152
        ],
        "page_idx": 5
    },
    {
        "type": "equation",
        "text": "$$\n[ \\mathrm {X} ] _ {\\text {反}} = \\left\\{ \\begin{array}{l l} \\mathrm {X} & \\mathrm {X} \\geq 0 \\\\ 2 - 2 ^ {- n} + \\mathrm {X} & \\mathrm {X} \\leq 0 \\end{array} \\right.\n$$",
        "text_format": "latex",
        "bbox": [
            670,
            101,
            974,
            162
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "（ mod (2-2-n) )",
        "bbox": [
            737,
            167,
            919,
            190
        ],
        "page_idx": 5
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "、表示方法：最高位为符号位，其他位为数值位。",
            " 符号位：0－正数，1－负数。",
            " 数值位：正数时，与绝对值相同；负数时，为绝对值取反"
        ],
        "bbox": [
            144,
            204,
            603,
            258
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "双值位，正数时，与绝对值怕问，贝数的，为绝对值取汉",
        "bbox": [
            152,
            274,
            442,
            282
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "对于定点整数：",
        "bbox": [
            161,
            287,
            245,
            300
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "·若 $\\mathsf { X } = + \\mathsf { X } _ { 1 } \\mathsf { X } _ { 2 } . . . . . . \\mathsf { X } _ { n } ,$ $\\mathbb { M } [ \\mathbf { X } ] _ { E } = 0 , \\mathbf { X } _ { 1 } \\mathbf { X } _ { 2 } . . . . . . . \\mathbf { X } _ { n }$ ",
        "bbox": [
            265,
            285,
            499,
            298
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "·若 $\\scriptstyle ( = - \\textsf { X } _ { 1 } , \\textsf { X } _ { 2 } , \\ldots , \\textsf { X } _ { n }$ ，则[X]反=1,xx... Xn ",
        "bbox": [
            265,
            299,
            514,
            310
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "对于定点小数：",
        "bbox": [
            161,
            322,
            245,
            332
        ],
        "page_idx": 5
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·若 $\\mathsf { \\pmb { \\Lambda } } = + \\mathbf { 0 } . \\mathsf { \\pmb { X } } _ { 1 } \\mathsf { \\pmb { X } } _ { 2 } . . . . . . . \\mathsf { \\pmb { X } } _ { n }$ $\\mathbb { R } ^ { | | \\mathbf { \\boldsymbol { X } } | } \\mathbb { R } ^ { = } \\mathbf { 0 } . \\mathbf { \\boldsymbol { X } } _ { 1 } \\mathbf { \\boldsymbol { X } } _ { 2 } . . . . . . . \\mathbf { \\boldsymbol { X } _ { n } }$ ",
            "若X=-0.Xx，则1. $\\boldsymbol { \\mathfrak { A } } \\boldsymbol { \\mathfrak { A } } [ \\mathbf { X } ] _ { E } = \\mathbf { 1 } .$ "
        ],
        "bbox": [
            265,
            319,
            531,
            350
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "（1）0的表示：0的反码表示有两种形式",
        "bbox": [
            144,
            360,
            391,
            372
        ],
        "page_idx": 5
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{r l} {[ + 0 ] _ {\\text {反}} = 0 0 \\dots 0} \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            163,
            376,
            265,
            387
        ],
        "page_idx": 5
    },
    {
        "type": "equation",
        "text": "$$\n[ - 0 ] _ {\\text {反}} = 1 1 \\dots 1\n$$",
        "text_format": "latex",
        "bbox": [
            337,
            376,
            423,
            388
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "（2）表示范围：对于n $^ +$ 1位反码机器数×，它所能表示的数据范围为：",
        "bbox": [
            144,
            390,
            552,
            401
        ],
        "page_idx": 5
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "定点整数：-(2n-1）≤X≤2n-1",
            "·定点小数:-（1-2-n）≤X≤1-2-n"
        ],
        "bbox": [
            161,
            405,
            400,
            432
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "移码",
        "bbox": [
            144,
            445,
            186,
            458
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "定点整数",
        "text_level": 1,
        "bbox": [
            188,
            468,
            240,
            508
        ],
        "page_idx": 5
    },
    {
        "type": "equation",
        "text": "$$\n[ \\mathrm {X} ] _ {\\text {移}} = 2 ^ {\\mathrm {n}} + \\mathrm {X}\n$$",
        "text_format": "latex",
        "bbox": [
            270,
            473,
            532,
            508
        ],
        "page_idx": 5
    },
    {
        "type": "equation",
        "text": "$$\n(\\mod 2 ^ {n + 1})\n$$",
        "text_format": "latex",
        "bbox": [
            334,
            523,
            482,
            546
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "2、表示方法：最高位为符号位，其他位为数值位。",
        "bbox": [
            144,
            556,
            539,
            571
        ],
        "page_idx": 5
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 符号位：1－正数，0－负数。",
            " 数值位：正数时，与绝对值相同；负数时，为绝对值取反后，末位加 1。"
        ],
        "bbox": [
            146,
            575,
            712,
            609
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "值位，正效的，与绝对值怕问，贝双的，为绝对值耿反旧，不位加",
        "bbox": [
            144,
            627,
            976,
            640
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "对于定点整数：",
        "text_level": 1,
        "bbox": [
            157,
            708,
            371,
            730
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "移码=补码的 符号位取反 ",
        "bbox": [
            744,
            665,
            912,
            713
        ],
        "page_idx": 5
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·若 $\\mathfrak { c } { = } { + } \\mathfrak { X } _ { 1 } \\mathfrak { X } _ { 2 } { \\dots } { \\dots } \\mathfrak { X } _ { n }$ ，则 $[ \\mathsf { X } ] _ { \\mp \\mathcal { B } } = \\mathsf { 1 } , \\mathsf { X } _ { 1 } \\mathsf { X } _ { 2 } . . . . . . \\mathsf { X } _ { \\mathsf { n } }$ ",
            "·若 $\\mathbf { \\ddot { X } } = - \\mathbf { \\nabla } \\mathbf { X } _ { 1 } \\mathbf { X } _ { 2 } \\ldots \\ldots \\mathbf { X } _ { n }$ ，则 $[ \\mathbf { X } ] _ { \\mathcal { F B } } = \\mathbf { 0 } ,$ ,xX Xx.. Xn +1. "
        ],
        "bbox": [
            196,
            747,
            900,
            820
        ],
        "page_idx": 5
    },
    {
        "type": "text",
        "text": "（1） 0的表示：0 的移码表示形式是唯一的",
        "bbox": [
            156,
            834,
            494,
            850
        ],
        "page_idx": 5
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " $[ + 0 ]$ 移＝ 10…0 [-0]移＝ 10…0",
            " （2）表示范围：对于 $\\mathsf { n } + \\mathsf { 1 }$ 位移码机器数 X，它所能表示的数据范围为：",
            " 定点整数： $- 2 \\mathsf { n } { \\mathsf { \\leq } } \\mathsf { X } \\leq 2 \\mathsf { n } - 1$ "
        ],
        "bbox": [
            146,
            853,
            719,
            904
        ],
        "page_idx": 5
    },
    {
        "type": "image",
        "img_path": "images/17570bda25ff10b972ee9301e89e66c4e3e561a977bba5dfa96f0a63acf2709d.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            174,
            97,
            231,
            131
        ],
        "page_idx": 6
    },
    {
        "type": "text",
        "text": "四种定点机器数的对比",
        "text_level": 1,
        "bbox": [
            265,
            96,
            495,
            116
        ],
        "page_idx": 6
    },
    {
        "type": "text",
        "text": "1、表示方法",
        "text_level": 1,
        "bbox": [
            552,
            99,
            682,
            117
        ],
        "page_idx": 6
    },
    {
        "type": "text",
        "text": "定点整数",
        "text_level": 1,
        "bbox": [
            216,
            167,
            302,
            185
        ],
        "page_idx": 6
    },
    {
        "type": "table",
        "img_path": "images/41c63d3523508f4ebc3df1e459527e3c41e3182e257cbced25cee0832cc19663.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>真值</td><td>X=+ X1X2......Xn</td><td>X=- X1X2......Xn</td></tr><tr><td>原码</td><td>[X]原=0 X1X2......Xn</td><td>[X]原=1 X1X2......Xn</td></tr><tr><td>反码</td><td>[X]反=0 X1X2......Xn</td><td>[X]反=1 X1X2......Xn</td></tr><tr><td>补码</td><td>[X]补=0 X1X2......Xn</td><td>[X]补=1 X1X2......Xn+1</td></tr><tr><td>移码</td><td>[X]移=1 X1X2......Xn</td><td>[X]移=0 X1X2......Xn+1</td></tr></table>",
        "bbox": [
            305,
            122,
            828,
            233
        ],
        "page_idx": 6
    },
    {
        "type": "text",
        "text": "定点小数",
        "text_level": 1,
        "bbox": [
            201,
            280,
            245,
            313
        ],
        "page_idx": 6
    },
    {
        "type": "table",
        "img_path": "images/4fb08762fdd2cab463ab29fc4b5ae17c5ee24e9f2245facd4630057aaaa9d5de.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>真值</td><td>X=+0.X1X2......Xn</td><td>X=-0.X1X2......Xn</td></tr><tr><td>原码</td><td>[X]原=0.X1X2......Xn</td><td>[X]原=1.X1X2......Xn</td></tr><tr><td>反码</td><td>[X]反=0.X1X2......Xn</td><td>[X]反=1.X1X2......Xn</td></tr><tr><td>补码</td><td>[X]补=0.X1X2......Xn</td><td>[X]补=1. X1 X2...... Xn + 0.00......1</td></tr><tr><td>移码</td><td>[X]移=1.X1X2......Xn</td><td>[X]移=0. X1 X2...... Xn + 0.00......1</td></tr></table>",
        "bbox": [
            255,
            237,
            831,
            357
        ],
        "page_idx": 6
    },
    {
        "type": "table",
        "img_path": "images/82e974e6af36d2b511be0bfa3d01f84da4b72e86186e1b9275b73b7ee0287a68.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>真值</td><td>X=+0</td><td>X=-0</td></tr><tr><td>原码</td><td>[X]原=0 00......0</td><td>[X]原=1 00......0</td></tr><tr><td>反码</td><td>[X]反=0 00......0</td><td>[X]反=1 11......1</td></tr><tr><td>补码</td><td colspan=\"2\">[X]补=0 00......0</td></tr><tr><td>移码</td><td colspan=\"2\">[X]移=1 00......0</td></tr></table>",
        "bbox": [
            147,
            395,
            969,
            620
        ],
        "page_idx": 6
    },
    {
        "type": "table",
        "img_path": "images/12af43b7c38126a6dbfa7217f2e5d569976f2ab0bdb03a07079c2a390a4e7a41.jpg",
        "table_caption": [
            "n+1位机器数"
        ],
        "table_footnote": [],
        "table_body": "<table><tr><td></td><td>定点整数</td><td>定点小数</td></tr><tr><td>原码</td><td>- (2n-1) ≤X ≤ 2n-1</td><td>- (1-2-n) ≤X≤1-2-n</td></tr><tr><td>反码</td><td>- (2n-1) ≤X ≤ 2n-1</td><td>- (1-2-n) ≤X≤1-2-n</td></tr><tr><td>补码</td><td>-2n≤X ≤ 2n-1</td><td>-1≤X ≤ 1-2-n</td></tr><tr><td>移码</td><td>-2n≤X ≤ 2n-1</td><td>-1≤X ≤ 1-2-n</td></tr></table>",
        "bbox": [
            154,
            676,
            515,
            790
        ],
        "page_idx": 6
    },
    {
        "type": "text",
        "text": "",
        "bbox": [
            154,
            103,
            268,
            120
        ],
        "page_idx": 7
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} \\because [ X ] _ {\\text {原}} = X _ {S}, X _ {1} X _ {2} \\dots X _ {n} \\\\ \\cdot X _ {S} = 0: X = + X _ {1} X _ {2} \\dots X _ {n} \\\\ X _ {S} = 1: X = - X _ {1} X _ {2} \\dots X _ {n} \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            154,
            103,
            332,
            171
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "",
        "bbox": [
            421,
            103,
            534,
            118
        ],
        "page_idx": 7
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} \\because [ X ] _ {\\text {反}} = X _ {S}, X _ {1} X _ {2} \\dots X _ {n} \\\\ = X _ {S} = 0: X = + X _ {1} X _ {2} \\dots X _ {n} \\\\ \\cdot \\mathbf {x} _ {s} = 1: X = - \\overline {{X _ {1}}} \\overline {{X _ {2}}} \\dots \\overline {{X _ {n}}} \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            421,
            103,
            618,
            172
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "[X]补→真值？ ",
        "bbox": [
            154,
            195,
            265,
            211
        ],
        "page_idx": 7
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} \\because [ X ] _ {\\text {补}} = X _ {S}, X _ {1} X _ {2} \\dots X _ {n} \\\\ \\cdot X _ {S} = 0: X = + X _ {1} X _ {2} \\dots X _ {n} \\\\ \\cdot X _ {S} = 1: X = - \\left(\\overline {{X _ {1}}} \\overline {{X _ {2}}} \\dots \\overline {{X _ {n}}} + 1\\right) \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            154,
            214,
            386,
            263
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "[X]移→真值？ ",
        "bbox": [
            421,
            196,
            534,
            212
        ],
        "page_idx": 7
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} \\because [ X ] _ {\\text {移}} = X _ {S}, X _ {1} X _ {2} \\dots X _ {n} \\\\ = X _ {S} = 1: X = + X _ {1} X _ {2} \\dots X _ {n} \\\\ \\cdot \\mathbf {X} _ {s} = \\mathbf {0}: X = - (\\overline {{X _ {1}}} \\overline {{X _ {2}}} \\dots \\overline {{X _ {n}}} + 1) \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            421,
            216,
            653,
            265
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "浮点数格式",
        "text_level": 1,
        "bbox": [
            147,
            278,
            240,
            293
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "浮点数N的构成：",
        "bbox": [
            149,
            302,
            265,
            316
        ],
        "page_idx": 7
    },
    {
        "type": "equation",
        "text": "$$\nN = M \\times R ^ {E}\n$$",
        "text_format": "latex",
        "bbox": [
            342,
            300,
            453,
            313
        ],
        "page_idx": 7
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "阶码E（Exponent）、尾数M（Mantissa）和阶码的底R（Radix)",
            "阶码的底R：是一个常数，隐含规定，一般为2、8或16"
        ],
        "bbox": [
            149,
            319,
            574,
            348
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "为什么将数符放置在首位？",
        "bbox": [
            157,
            357,
            203,
            385
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "将数符放置 在首位，方 便比较大小 ",
        "bbox": [
            156,
            401,
            211,
            428
        ],
        "page_idx": 7
    },
    {
        "type": "image",
        "img_path": "images/f318b4e4d2f9ec985b58f83758be6fd1d10255482e3dcd00bc9b8f495c476389.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            278,
            357,
            579,
            400
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "浮点数格式要素：",
        "bbox": [
            265,
            405,
            383,
            417
        ],
        "page_idx": 7
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\textcircled{1}$ 位数：阶码位数 $^ +$ 尾数位数→总位数",
            "$\\textcircled{2}$ 编码：阶码和尾数采用的机器数编码",
            "$\\textcircled{3}$ 排列顺序：数符是否在最高位",
            "$\\textcircled{4}$ 其他特殊的编码规则：譬如隐藏位"
        ],
        "bbox": [
            285,
            419,
            532,
            473
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "尾数M：定点小数",
        "text_level": 1,
        "bbox": [
            164,
            500,
            317,
            514
        ],
        "page_idx": 7
    },
    {
        "type": "equation",
        "text": "$$\n0. 1 0 1 1 1 0 \\times 2 ^ {- 2} = 0. 0 0 1 0 1 1 1\n$$",
        "text_format": "latex",
        "bbox": [
            527,
            499,
            717,
            513
        ],
        "page_idx": 7
    },
    {
        "type": "equation",
        "text": "$$\nN = M \\times R ^ {E}\n$$",
        "text_format": "latex",
        "bbox": [
            563,
            519,
            695,
            538
        ],
        "page_idx": 7
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "尾数的位数：决定了浮点数有效数值的精度",
            "·尾数的符号：数符，代表了浮点数的正负 ",
            "·尾数的编码：一般采用原码和补码表示"
        ],
        "bbox": [
            186,
            521,
            492,
            571
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "阶码E：定点整数",
        "text_level": 1,
        "bbox": [
            164,
            579,
            309,
            593
        ],
        "page_idx": 7
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·阶码的位数：多少决定了浮点数的表示范围",
            "·阶码的数值：大小决定了数据实际小数点位置与尾数的小数点位置之间的偏移量",
            "·阶码的符号：阶符，决定了实际小数点位置在尾数的小数点位置的左边还是右边",
            "·阶码的编码：一般采用移码和补码表示"
        ],
        "bbox": [
            186,
            599,
            732,
            670
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "阶码的底R：一般为2、8或16，且隐含规定",
        "text_level": 1,
        "bbox": [
            164,
            677,
            505,
            690
        ],
        "page_idx": 7
    },
    {
        "type": "image",
        "img_path": "images/6a0fe239362570bed9f3912109c3557d492e9c9e6cb11a12f124138b78f42013.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            453,
            703,
            478,
            714
        ],
        "page_idx": 7
    },
    {
        "type": "text",
        "text": "非规格化浮点数：",
        "text_level": 1,
        "bbox": [
            154,
            110,
            329,
            128
        ],
        "page_idx": 8
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "规格化操作：修改阶码和左右移尾数的方法来使其变为规格化浮点数",
            "右规：尾数进行右移实现的规格化",
            "左规：尾数进行左移实现的规格化"
        ],
        "bbox": [
            181,
            135,
            521,
            219
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "什么情况下要做规格化操作？",
        "text_level": 1,
        "bbox": [
            526,
            110,
            806,
            128
        ],
        "page_idx": 8
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "尾数有前导零：即 $\\textless 1 / 2$ ，需要左规",
            "尾数运算溢出：即≥1，需要右规"
        ],
        "bbox": [
            554,
            135,
            870,
            175
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "使用规格化浮点数表示数据的优点：",
        "text_level": 1,
        "bbox": [
            526,
            190,
            863,
            209
        ],
        "page_idx": 8
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "提高了浮点数据的精度",
            "使程序能够更方便地交换浮点数据",
            "可以使浮点数的运算更为简化"
        ],
        "bbox": [
            554,
            216,
            855,
            280
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "（自定义格式）规格化浮点数表示方法：",
        "text_level": 1,
        "bbox": [
            152,
            274,
            532,
            293
        ],
        "page_idx": 8
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "（1）写出数据的二进制真值",
            "(2）转换为M×2的形式，其中M为没有前导零的定点小数，E为整数",
            "（3）按照格式写出M和E的规定机器数编码",
            "（4）按照格式要求排列E和M"
        ],
        "bbox": [
            191,
            298,
            761,
            382
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "浮点数的运算过程中，尾数发生溢出（超出尾数所能表示的范围），进行右规。右规一次即可。",
        "bbox": [
            144,
            407,
            757,
            442
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "阶码发生溢出时，浮点数被判为溢出",
        "bbox": [
            146,
            445,
            433,
            460
        ],
        "page_idx": 8
    },
    {
        "type": "image",
        "img_path": "images/a61299ff3ee52a556a1dcdca353af19b9a90d7dae7b2db0fa0bfe27f716b35b7.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            845,
            363,
            885,
            387
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "1. 一些小结论",
        "text_level": 1,
        "bbox": [
            147,
            504,
            317,
            526
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "由于补码表示的最大值和最小值是非对称的",
        "bbox": [
            144,
            607,
            487,
            623
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "即最大值的绝对值(0111)的原码比最小值的绝对值的(1000)原码要小",
        "bbox": [
            146,
            625,
            677,
            642
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "对于 n 位定点整数的机器数则为（ $( n + 1$ ）位（算上符号位）",
        "bbox": [
            146,
            644,
            594,
            659
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "对于一个负数X来说",
        "bbox": [
            146,
            663,
            309,
            678
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "[X]原+[X]补 $\\cdot = 2 \\wedge _ { \\mathsf { n } }$ ",
        "bbox": [
            146,
            682,
            280,
            697
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "Eg.[-2]原 $= 1 0 1 0$ ；[-2]补 $\\mathord { \\left. \\kern - delimiterspace \\right.} 1 1 0 $ ，相加为 1000（当成原码并去掉符号位，就是 8）",
        "bbox": [
            146,
            699,
            761,
            715
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "负数的补码就是其绝对值的补数",
        "bbox": [
            164,
            718,
            416,
            734
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "X的绝对值 $+ [ x ]$ 补但是[x]补当成原码去掉符号位，为10000即 $^ { 2 \\wedge }$ （ $( n + 1 )$ ）",
        "bbox": [
            144,
            737,
            705,
            753
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "还是上个例子。[-2]补 $= 1 1 1 0 = 1 4$ ， $2 + 1 4 = 1 6$ ；",
        "bbox": [
            146,
            755,
            495,
            771
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "所以，有符号数和无符号数之间的转换规则是：",
        "bbox": [
            146,
            774,
            510,
            789
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "位模式不变，但是解释这些位的方式改变了",
        "bbox": [
            146,
            793,
            484,
            808
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "数值数据的表示",
        "bbox": [
            146,
            810,
            273,
            826
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "进位计数制",
        "bbox": [
            146,
            829,
            240,
            845
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "不同数制之间的转换",
        "bbox": [
            146,
            848,
            309,
            864
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "十进制的编码",
        "bbox": [
            146,
            866,
            255,
            882
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "机器数",
        "bbox": [
            146,
            885,
            203,
            900
        ],
        "page_idx": 8
    },
    {
        "type": "text",
        "text": "数值数据在计算机中的表示形式称为机器数。机器数的特点是：",
        "bbox": [
            146,
            93,
            633,
            108
        ],
        "page_idx": 9
    },
    {
        "type": "text",
        "text": "$^ \\ast$ 机器数：数值数据在计算机中的二进制表示形式。真值：机器数真正表示的数值数据",
        "bbox": [
            147,
            111,
            544,
            122
        ],
        "page_idx": 9
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·机器数的符号位必须被数值化为二进制0和1书写：+/-符号数值（二进制或 ",
            "·机器数的小数点用隐含规定的方式来表达",
            "·表示的数值范围受计算机字长的限制",
            "·编码方法：不同的排列方式，常见的有原码、反码、补码、移码。"
        ],
        "bbox": [
            161,
            124,
            542,
            172
        ],
        "page_idx": 9
    },
    {
        "type": "image",
        "img_path": "images/c47a7a94827b3662a134a37286e20304c8e0e73f91dd09676afa6229802037f6.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            519,
            168,
            537,
            183
        ],
        "page_idx": 9
    },
    {
        "type": "text",
        "text": "定点机器数的表示方法",
        "text_level": 1,
        "bbox": [
            146,
            206,
            420,
            229
        ],
        "page_idx": 9
    },
    {
        "type": "text",
        "text": "一个字节由 8 个位组成",
        "bbox": [
            146,
            274,
            327,
            288
        ],
        "page_idx": 9
    },
    {
        "type": "text",
        "text": "我们把这种按照一位一位表示数据的方式称为位模式",
        "bbox": [
            146,
            292,
            556,
            307
        ],
        "page_idx": 9
    },
    {
        "type": "text",
        "text": "对于无符号数编码",
        "bbox": [
            146,
            311,
            292,
            326
        ],
        "page_idx": 9
    },
    {
        "type": "text",
        "text": "在机器中的解释，采用原码表示法（？）",
        "bbox": [
            146,
            329,
            457,
            344
        ],
        "page_idx": 9
    },
    {
        "type": "image",
        "img_path": "images/29519d3b05891aec898580f89a8b7d69cdc6b6f2666f40bc361510a60e4b8e61.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            344,
            774,
            501
        ],
        "page_idx": 9
    },
    {
        "type": "text",
        "text": "对于有符号数的编码，采用补码",
        "bbox": [
            146,
            514,
            398,
            529
        ],
        "page_idx": 9
    },
    {
        "type": "image",
        "img_path": "images/3bb2c65a3b93dd5f3ba70445f8e1ac6b1845d70eca6912b30ec7b60296858a1a.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            89,
            808,
            335
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "对于相同的位模式，无符号数和有符号数的数值关系如图所示：",
        "bbox": [
            144,
            351,
            636,
            368
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "（这里的 B2U/B2T 是位向量到无符号数和有符号数的函数映射）",
        "bbox": [
            156,
            370,
            643,
            387
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "最高位理解成负权重-2^w-1",
        "bbox": [
            146,
            390,
            364,
            405
        ],
        "page_idx": 10
    },
    {
        "type": "equation",
        "text": "$$\nB 2 U _ {w} = x _ {w - 1} \\cdot 2 ^ {w} + B 2 T _ {w}\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            416,
            349,
            432
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "用 T2U 来表示有符号数到无符号数的函数映射",
        "bbox": [
            144,
            445,
            509,
            460
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "$T 2 U _ { w } ( x ) = \\left\\{ \\begin{array} { c } { { x + 2 ^ { w } , x < 0 } } \\\\ { { x , x > 0 } } \\end{array} \\right.$ $T 2 U _ { w } \\left( x \\right) = \\left( x + 2 ^ { w } \\right)$ ",
        "bbox": [
            146,
            468,
            621,
            508
        ],
        "page_idx": 10
    },
    {
        "type": "equation",
        "text": "$$\nU 2 T _ {w} (u) = \\left\\{ \\begin{array}{l} x, u \\leq T M \\max  _ {u} \\\\ x - 2 ^ {w}, u > T M a x _ {u} \\end{array} \\right.\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            519,
            400,
            558
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "W位(包含了符号位！)补码表示的数值",
        "bbox": [
            144,
            575,
            445,
            590
        ],
        "page_idx": 10
    },
    {
        "type": "equation",
        "text": "$$\n\\omega = - x _ {\\omega - 1} 2 ^ {\\omega - 1} + \\sum_ {i = 0} ^ {\\omega - 2} x _ {i} 2 ^ {i}\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            599,
            357,
            637
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "也就是说，把第一位作为负数- $. 2 \\land \\mathfrak { n }$ 来处理；正数为 0,负数为 1；",
        "bbox": [
            144,
            649,
            636,
            665
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "你可能已经发现，二进制数的“互补数”编码规则和补码的定义非常的像，其实不是像，而是它们本来就是等价的。也就是“对应正数的互补数”等于“对应正数按位取反再加1”。下面尝试证明。",
        "bbox": [
            144,
            667,
            828,
            719
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "原命题精确描述为：相对于 w 位的二进制数，整数 $\\mathsf { b } \\in ( 0 , ]$ ，即 $\\mathsf { b } \\in ( 0 , ]$ ，等式 $- b = - b + 1$ 成立。",
        "bbox": [
            144,
            722,
            830,
            757
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "原码、补码、反码、移码的直接二进制值（机器数的形式值）各自有什么作用？",
        "bbox": [
            144,
            760,
            761,
            775
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "反码、补码的真值为负数的时候机器数形式值（符号位作为 ${ 2 } \\Lambda _ { \\mathsf { n } }$ 而不是正负号）减去对应的 $2 \\sim ( \\mathsf { n } + 1 )$ 或者是 $_ { 2 ^ { \\wedge } }$ （n+1） $+ 1$ 就是这个机器数的真值。",
        "bbox": [
            144,
            778,
            843,
            812
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "移码是无论正负直接减去 $2 \\sim ( \\mathsf { n } + 1 )$ ",
        "bbox": [
            144,
            816,
            411,
            832
        ],
        "page_idx": 10
    },
    {
        "type": "text",
        "text": "而原码没有类似的结果",
        "bbox": [
            146,
            834,
            327,
            850
        ],
        "page_idx": 10
    },
    {
        "type": "image",
        "img_path": "images/78e6ebe0fa6d18716eca1d48f88e453ca73f8c16ae9fe3c381407ee46ef7c2df.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            97,
            811,
            307
        ],
        "page_idx": 11
    },
    {
        "type": "text",
        "text": "有符号数最高位为 0（正数），其余为 1",
        "bbox": [
            147,
            315,
            460,
            332
        ],
        "page_idx": 11
    },
    {
        "type": "image",
        "img_path": "images/e3ecdb1331e495f2deeb4e6668c8da5f41e4d66251fb5eee1929cfca02758dec.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            357,
            801,
            567
        ],
        "page_idx": 11
    },
    {
        "type": "text",
        "text": "有符号数的-1和无符号数的最大值一样编码表示",
        "bbox": [
            147,
            574,
            524,
            590
        ],
        "page_idx": 11
    },
    {
        "type": "image",
        "img_path": "images/d7ebf2a15fdae3ac42d3466cc5c4d421de2dfae73da3be0f75e1620b2f98e562.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            593,
            882,
            813
        ],
        "page_idx": 11
    },
    {
        "type": "text",
        "text": "2．真值与补码的转换 ",
        "text_level": 1,
        "bbox": [
            144,
            99,
            408,
            122
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "真值->补码",
        "text_level": 1,
        "bbox": [
            144,
            166,
            238,
            181
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "正数的补码：去掉 $^ +$ 号前面加 0。",
        "bbox": [
            144,
            185,
            394,
            199
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "负数的补码：1、去掉 - 号前面加 1，从右到左找到第一个 1，左边全部取反。",
        "bbox": [
            144,
            203,
            739,
            218
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "2、负数的补码是将原码的符号位保持不变,其余各位取反，然后加1,就得到其补码;",
        "bbox": [
            144,
            221,
            788,
            236
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "计算一个负数的补码时，通常遵循以下步骤：",
        "bbox": [
            144,
            240,
            494,
            255
        ],
        "page_idx": 12
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "1. 取绝对值的二进制表示：求出绝对值（即对应正数），求出数值的二进制形式。",
            "2. 取反：将二进制数的每一位取反，即 0 变为 1，1 变为 $0 _ { \\circ }$ ",
            "3. 加 1：在取反结果的基础上加 1，得到最终的补码表示。"
        ],
        "bbox": [
            176,
            258,
            816,
            311
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "也就是说，符号位参与了运算。在第 2 步实际上已经将“符号位为 1“表示成 0-1",
        "bbox": [
            144,
            313,
            763,
            329
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "实际上，这个符号位啊，你无论是先不管符号位取反再上符号位为 1，还是一起从绝对值取反（从0变成1—），不都是符号位为1吗？但参与 $+ 1$ 运算是必须的。",
        "bbox": [
            144,
            332,
            847,
            366
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "补码- $\\cdot >$ 真值 ",
        "text_level": 1,
        "bbox": [
            144,
            370,
            238,
            385
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "符号位 0 的补码的真值：去掉 0 前面加 $^ +$ 号。",
        "bbox": [
            144,
            388,
            485,
            403
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "符号位1的补码的真值：",
        "bbox": [
            144,
            407,
            336,
            422
        ],
        "page_idx": 12
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "1、去掉 1 前面加-号，从右到左找到第一个 1，左边全部取反。",
            "2、负数的原码就是它的补码的补码。",
            "3、如果补码的符号位为“1”，表示是一个负数，那么补码减1,再将符号位保持不变其余各位取反"
        ],
        "bbox": [
            144,
            425,
            833,
            495
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "3.对于 $( X + 2 \\land ( \\mathbf { n } + 1 ) )$ mod (2^(n+1))的解释 ",
        "text_level": 1,
        "bbox": [
            176,
            558,
            678,
            581
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "对某两个整数a，b，若它们除以正整数 $\\mathsf { m }$ 所得的余数相等，则称a，b对于模m同余，也就是严格来说，存在整数k使得",
        "bbox": [
            144,
            642,
            821,
            677
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "$a - b = k m$ ，则称 a,b 对于除数 $\\mathsf { m }$ 是同余的。一般记做",
        "bbox": [
            144,
            680,
            561,
            695
        ],
        "page_idx": 12
    },
    {
        "type": "equation",
        "text": "$$\na \\equiv b (\\bmod m)\n$$",
        "text_format": "latex",
        "bbox": [
            146,
            699,
            253,
            714
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "在模运算中，一个数与它除以“模”后得到的余数是等价的，如 A、B、M 满足",
        "bbox": [
            144,
            717,
            763,
            732
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "$\\mathsf { A } { = } \\mathsf { B } { + } \\mathsf { K } { \\times } \\mathsf { M } ( \\mathsf { K }$ 为整数)，则记为 $\\mathsf { A } \\equiv \\mathsf { B } ( \\mathsf { m o d } \\mathsf { M } )$ )，即 A、B各除以 M后的余数相同。在补码运算中，[A]补-[B]补=[A]补 $+ \\mathsf { M }$ -[B]补，而 M-[B]补 $=$ [-B]补，因此补码可以借助加法运算来实现减法运算。从模运算的角度，补码的表示利用了以下规律：",
        "bbox": [
            144,
            734,
            843,
            788
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "模运算的同余性质：对于任意整数 a 和模数 $\\mathsf { m }$ ，有 $\\mathsf { a } \\equiv \\mathsf { a } + \\mathsf { k m } ( \\mathsf { m o d } \\mathsf { m } )$ ，其中 k为整数。这意味着在模 $\\mathsf { m }$ 的运算中，数值是循环的，超过 $\\mathsf { m }$ 会回到起点。",
        "bbox": [
            144,
            791,
            843,
            825
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "为何常见写法是 $^ { 6 6 } x + 2 \\wedge _ { \\mathsf { n } + 1 }$ mod $\\mathsf { \\pm } \\mathsf { \\Lambda } \\mathsf { n } \\mathsf { \\pm } ^ { \\prime }$ 1”而不是 $\\pmb { \\times }$ mod $^ { 2 n + 1 }$ ",
        "bbox": [
            144,
            828,
            631,
            843
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "数论上， $^ { * } \\times$ 与 $\\mathsf { x } + 2 \\wedge \\{ \\mathsf { n } + 1 \\} \\times ^ { \\prime \\prime }$ 在模 $2 \\cdot \\{ \\mathsf { n } + 1 \\}$ 下等价；",
        "bbox": [
            144,
            846,
            544,
            862
        ],
        "page_idx": 12
    },
    {
        "type": "text",
        "text": "但在说明“补码如何把负数映射到二进制的高半区”时，显式地加上 $2 \\times \\{ \\mathsf { n } + 1 \\}$ 更能直观反映“负数被搬到了高位 $\\ O = \\uparrow$ 的区间”这个事实。",
        "bbox": [
            144,
            865,
            842,
            898
        ],
        "page_idx": 12
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 非负数直接写成“它自己” (因为落在小半区间 $[ 0 , 2 \\land \\mathsf { n } ) ]$ )；",
            " 负数写成 $^ { \\mathfrak { a } } \\mathsf { X } + 2 ^ { \\wedge } \\{ \\mathsf { n } + 1 \\} ^ { \\prime \\prime }$ (因为这样就落在大半区间 $[ 2 \\land \\neg , 2 \\land \\{ \\mathsf { n } + 1 \\} - 1 ] ) _ { \\circ }$ "
        ],
        "bbox": [
            144,
            93,
            707,
            128
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "在计算机系统中， $\\mathsf { n }$ 位定点整数（包括符号位）补码的取值范围是 $- 2 \\land \\mathsf { n }$ 到 $2 \\ n _ { \\mathsf { n } } - 1$ 。",
        "bbox": [
            144,
            130,
            794,
            145
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "这意味着总共有 $2 \\cdot \\{ \\mathsf { n } + 1 \\}$ 个不同的数值可以表示。因此，模数 $2 \\cdot \\{ \\mathsf { n } + 1 \\}$ 对应于这些数值的总数量。",
        "bbox": [
            144,
            148,
            843,
            183
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "负数的表示：在模 $2 \\cdot \\{ \\mathsf { n } + 1 \\}$ 的系统中，负数 X 可以表示为 $2 \\wedge \\{ \\mathsf { n } + 1 \\} + \\mathsf { X } ,$ ,因为 X 为负数，会落在 $2 \\land ( \\mathsf { n } )$ 到 $2 \\cdot \\{ \\mathsf { n } + 1 \\} - 1$ 的范围内，符合无符号数的表示范围。",
        "bbox": [
            144,
            186,
            835,
            219
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "因为模为 $2 \\cdot ( n + 1 ) , k = 1$ $k = 1$ ，那么就可以将- $2 ^ { \\wedge } \\mathsf { n } - 2 ^ { \\wedge } \\mathsf { n } - 1$ 统一成 $( X { + } 2 ^ { \\wedge } ( \\mathsf { n } { + } 1 ) )$ ) mod $( 2 \\land ( \\mathsf { n } + 1 ) )$ ",
        "bbox": [
            144,
            223,
            811,
            239
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "减法（加上一个负数）的运算用加法代替了，我们说的补码（反码）实际上是数对于一个模的同余数。",
        "bbox": [
            144,
            241,
            836,
            275
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "（这里的取模运算，请让我们抛弃符号数，eg.-2 mod $8 { = } 6$ , $[ 6 ] { = } 1 1 0$ ,而 [-2]补 $\\mathord { = } 1 1 1 0$ ，当成原码，去掉符号位）",
        "bbox": [
            144,
            278,
            831,
            312
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "规定：把0当成正数，也即 $+ 0$ ，这样0的编码就变成：0，0000000。那8位二进制表示的正数范围仍然是： $+ 0 -- + 1 2 7 _ { \\mathrm { { ( } } }$ 。",
        "bbox": [
            144,
            315,
            831,
            349
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "但是，对于负数就必须要做调整，也即-0必须要让位---1，0000000这个编码不能表示-0。我们可以把负数整体向后“挪动1位”：只要将8位二进制表示的负数范围从：-127—— -0变成：-128 —— -1，就能成功解决问题。",
        "bbox": [
            144,
            351,
            826,
            405
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "-0 的补数是 $2 5 6 - 0 = 2 5 6 = 0 \\times 1 0 0$ ，由于是“8 位二进制数”，所以-0 的补数是 $0 \\times 0 0$ ；‘我们知道“- $\\cdot 1 = 0 - 1 \\prime$ ，所以",
        "bbox": [
            144,
            407,
            836,
            441
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "-1 的补数是 $2 5 6 - 1 = 2 5 5 = 0 \\times 1 =$ ；这就好比是\"0-1\"不够减，\"借 256\"得到的（这里借的是模数值）。",
        "bbox": [
            144,
            445,
            836,
            479
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "同理，可以-2~-127的补数；",
        "bbox": [
            144,
            482,
            364,
            497
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "注意：这里的补数，就是计算机所讲的补码。",
        "bbox": [
            144,
            501,
            492,
            516
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "-127 的补数是 $2 5 6 - 1 2 7 = 1 2 9 = 0 \\times 8 1$ ",
        "bbox": [
            144,
            520,
            428,
            535
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "-1~-127 的补码范围： $0 { \\times } \\mathsf { F F } { \\sim } 0 { \\times } 8 1$ ",
        "bbox": [
            144,
            539,
            416,
            552
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "负数-128的补码：",
        "bbox": [
            144,
            557,
            285,
            571
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "我们知道“- $\\cdot 1 2 8 = 0 - 1 2 8 ^ { \\prime \\prime }$ ，“ $- 1 2 8 = - 1 + - 1 2 7 ^ { \\prime \\prime }$ 所以",
        "bbox": [
            144,
            575,
            527,
            590
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "-128 的补数是 $2 5 6 - 1 2 8 = 1 2 8 = 0 \\times 8 0$ ；所以-128 的补码为 0x80，但是-128 没有原码和反码。所以人为地规定 10000000 表示-128",
        "bbox": [
            144,
            593,
            848,
            627
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "总结：",
        "bbox": [
            146,
            631,
            193,
            645
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "补码补码，就是补上去一个模对应的补数",
        "bbox": [
            144,
            649,
            468,
            664
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "小结",
        "text_level": 1,
        "bbox": [
            146,
            689,
            205,
            709
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "在一个区间长度为 M 内，统一正负数的常用方法是",
        "bbox": [
            144,
            756,
            546,
            771
        ],
        "page_idx": 13
    },
    {
        "type": "equation",
        "text": "$$\nX ^ {\\prime} = (X + M) \\mod M\n$$",
        "text_format": "latex",
        "bbox": [
            144,
            774,
            304,
            788
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "其中 M 就是模数。如果你换成一个非 M 的倍数 N，则只有在 $\\Nu \\equiv 0$ (mod M)的情况下才能达到同样效果。因此，负数加上的部分必须是 M 的倍数，通常取最小正倍数 M 来实现统一。",
        "bbox": [
            144,
            791,
            843,
            844
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "可以这么理解：如果一个区间（或集合）恰好包含 $\\mathsf { m }$ 个整数，并且这 $\\mathsf { m }$ 个整数构成了一个模 $\\mathsf { m }$ 的完全剩余系，那么对任意整数 X，用",
        "bbox": [
            144,
            848,
            835,
            882
        ],
        "page_idx": 13
    },
    {
        "type": "equation",
        "text": "$$\nX \\bmod m\n$$",
        "text_format": "latex",
        "bbox": [
            146,
            885,
            223,
            898
        ],
        "page_idx": 13
    },
    {
        "type": "text",
        "text": "总能得到落在这个集合中的唯一代表。换句话说，只要这个集合包含的元素个数为 m（而且互不同余），那么无论 X是正数还是负数，都有",
        "bbox": [
            144,
            93,
            842,
            127
        ],
        "page_idx": 14
    },
    {
        "type": "equation",
        "text": "$$\nX \\equiv X \\bmod m\n$$",
        "text_format": "latex",
        "bbox": [
            146,
            131,
            248,
            143
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "而且 Xmodm 就是该模 m 意义下的标准表示。",
        "bbox": [
            144,
            148,
            505,
            164
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "为什么定点小数的模 2？",
        "text_level": 1,
        "bbox": [
            146,
            174,
            428,
            196
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "至于模数为 2 的说法，这是因为补码表示中，数值的表示是循环的。例如，-1 和 $1 - 2 \\land ( - \\mathsf { n } )$ 之间的差值正好是 $2 - 2 \\land ( - \\mathsf { n } )$ ，但由于补码的循环特性，这个差值在模 2 的意义下是等价的。$- 2 \\land ( - \\mathsf { n } )$ 并没有被省略，而是补码表示的范围已经包含了从 -1 到 $1 - 2 \\land ( - \\mathsf { n } )$ 的所有可能值。补码的模数为 2 是因为补码表示中，数值的表示是循环的，且循环周期为 2。",
        "bbox": [
            144,
            204,
            853,
            275
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "关于数的扩展",
        "text_level": 1,
        "bbox": [
            146,
            319,
            314,
            341
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "基本上是这样的。对两类数来说：",
        "bbox": [
            144,
            385,
            406,
            400
        ],
        "page_idx": 14
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "高位扩展（符号扩展）：",
            "低位扩展（增加精度）："
        ],
        "bbox": [
            176,
            403,
            396,
            437
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "定点整数的符号扩展：",
        "text_level": 1,
        "bbox": [
            146,
            458,
            317,
            474
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "对于无符号数，称为零扩展",
        "bbox": [
            144,
            478,
            366,
            493
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "对于有符号数，称为符号位扩展",
        "bbox": [
            144,
            495,
            400,
            511
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "在原符号位和数值位中间添加新位，正数都添0，负数原码添0，负数反、补码、移码添1。",
        "bbox": [
            144,
            514,
            830,
            548
        ],
        "page_idx": 14
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} B 2 T _ {w} \\left(\\left[ x _ {w - 1}, x _ {w - 2}, \\dots , x _ {0} \\right]\\right) (1) \\\\ B 2 T _ {w + k} \\left(\\left[ x _ {w - 1}, \\dots , x _ {w - 1}, x _ {w - 1}, \\dots , x _ {0} \\right]\\right) (2) \\\\ B 2 T _ {w + 1} - B 2 T _ {w} = 0 \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            555,
            463,
            615
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "定点小数的符号扩展：",
        "text_level": 1,
        "bbox": [
            146,
            626,
            317,
            640
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "在原符号位和数值位后面添加新位，正数都添0，负数原、补码、移码添0，负数反码添1。",
        "bbox": [
            144,
            644,
            830,
            677
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "低位截断 ",
        "text_level": 1,
        "bbox": [
            146,
            681,
            221,
            696
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "将 int 类型强制转换为 short 类型，高 16 位被丢弃",
        "bbox": [
            144,
            700,
            547,
            715
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "将一个 $\\pmb { \\mathsf { W } }$ 位的无符号数，截断成k位的方法是，丢弃最高的w-k位。截断操作可以对应于取模运算。",
        "bbox": [
            144,
            718,
            845,
            752
        ],
        "page_idx": 14
    },
    {
        "type": "equation",
        "text": "$$\nB 2 U _ {w} \\left(\\left[ x _ {w - 1}, x _ {w - 2}, \\dots , x _ {0} \\right]\\right) \\mod 2 ^ {k} = B 2 U _ {k} \\left(\\left[ x _ {k - 1}, x _ {k - 2}, \\dots , x _ {0} \\right]\\right)\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            763,
            623,
            780
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "截断有符号数",
        "text_level": 1,
        "bbox": [
            146,
            791,
            258,
            807
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "先转换成无符号数，再截断，再转换成有符号数",
        "bbox": [
            144,
            810,
            522,
            826
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "即 ",
        "bbox": [
            146,
            829,
            169,
            844
        ],
        "page_idx": 14
    },
    {
        "type": "equation",
        "text": "$$\nT ^ {2} U _ {w} (x) = \\left\\{ \\begin{array}{c} x + 2 ^ {w}, x <   0 \\\\ x, x > 0 \\end{array} \\right., \\text {即} T 2 U _ {w} (x) = (x + 2 ^ {w}) \\mod 2 ^ {w}\n$$",
        "text_format": "latex",
        "bbox": [
            300,
            852,
            600,
            878
        ],
        "page_idx": 14
    },
    {
        "type": "equation",
        "text": "$$\nB 2 T _ {k} \\left(\\left[ x _ {k - 1}, \\dots , x _ {0} \\right]\\right) = U 2 T _ {w} \\left(\\left[ B 2 T _ {w} \\left(\\left[ x _ {w - 1}, x _ {w - 2}, \\dots , x _ {0} \\right]\\right) + 2 ^ {w} \\right] \\mod 2 ^ {w} \\right] \\mod 2 ^ {k}) = U 2 T _ {w} \\left(B 2 U _ {w} \\left(\\left[ x _ {w - 1}, x _ {w - 2}, \\dots , x _ {0} \\right]\\right) \\mod 2 ^ {k}\\right)\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            882,
            754,
            896
        ],
        "page_idx": 14
    },
    {
        "type": "text",
        "text": "4、其他运算符",
        "text_level": 1,
        "bbox": [
            144,
            170,
            329,
            195
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "布尔运算（位级运算）",
        "text_level": 1,
        "bbox": [
            144,
            243,
            406,
            267
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "~/NOT 非（取反）（单目运算）",
        "bbox": [
            144,
            309,
            396,
            325
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "&/AND 与",
        "bbox": [
            147,
            328,
            230,
            343
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "|/OR 或",
        "bbox": [
            149,
            346,
            216,
            362
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "^/EXCLUSIVE-OR 异或 ",
        "bbox": [
            147,
            365,
            327,
            380
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "取反的时候：",
        "bbox": [
            147,
            382,
            247,
            399
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "因此，可以总结出~按位取反的计算结论是： $\\sim \\mathsf { n } = - ( \\mathsf { n } + 1 )$ ",
        "bbox": [
            147,
            401,
            584,
            418
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "例如本例中， $\\mathord { \\sim } 5 = - ( 5 + 1 )$ ，即 $\\mathord { \\sim } 5 = - 6$ ",
        "bbox": [
            147,
            420,
            435,
            436
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "逻辑运算 ",
        "text_level": 1,
        "bbox": [
            146,
            461,
            258,
            483
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "所有非零参数为 true，参数 0 表示 false",
        "bbox": [
            144,
            527,
            462,
            543
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "结果只有两个，true与false 惰性运算",
        "bbox": [
            147,
            545,
            448,
            561
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "|| OR ",
        "bbox": [
            149,
            564,
            201,
            579
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "&& AND ",
        "bbox": [
            147,
            583,
            218,
            596
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "! NOT ",
        "bbox": [
            147,
            602,
            196,
            615
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "移位运算 ",
        "text_level": 1,
        "bbox": [
            144,
            640,
            258,
            664
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "逻辑移位。将移位的数据视为无符号数据，移位的结果知识数据位置发生了变化。移出的数据位一般置入CF标志位(进位、借位 标志)",
        "bbox": [
            144,
            707,
            850,
            741
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "算术移位，对象是有符号数，算术移位的结果在绝对值上进行放大缩小；符号位保持不变。",
        "bbox": [
            144,
            744,
            847,
            760
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "计算机的算术移位指令大多采用补码的 移位规则",
        "bbox": [
            147,
            763,
            527,
            778
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "循环移位，左移时最高位移入最低位，右移时最高位移入最低为，若和CF标志位一起循环，则称为大循环，否则小循环",
        "bbox": [
            144,
            781,
            855,
            816
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "左移相当于乘以2，右移相当于除以二",
        "bbox": [
            144,
            819,
            448,
            834
        ],
        "page_idx": 15
    },
    {
        "type": "text",
        "text": "CF: 进位/借位标志。最近的操作使最高位产生了进位。可用来检査无符号操作的溢出。 加法运算时 $\\textstyle \\sum = 1$ ,则CF置1表示进位；减法运算时 $C { = } 0 , C F$ 置1表示借位。CF只对无符号数运算有意义。",
        "bbox": [
            144,
            837,
            850,
            891
        ],
        "page_idx": 15
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "ZF: 零标志。最近的操作得出的结果为 0（全零）则 ZF 置 1。",
            "SF: 符号标志。记录运算结果的符号，它与运算结果的最高位相同。采用补码表示，运算结果为正数置0，负数置1。",
            "OF: 溢出标志。最近的操作导致一个补码溢出——正溢出或负溢出。有符号数有意义。有溢出则置1，否则置0；",
            "PF:奇偶标志位。操作数 1 的个数为偶数置 1，否则置 0；"
        ],
        "bbox": [
            144,
            93,
            845,
            200
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "左移",
        "text_level": 1,
        "bbox": [
            146,
            229,
            200,
            247
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "逻辑左移，高位移出，低位补0 ",
        "bbox": [
            144,
            288,
            394,
            303
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "左移不区分算术还是逻辑",
        "bbox": [
            144,
            307,
            344,
            321
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "对于原码的算术左移，符号位不变，高位移出，低位补 0；",
        "bbox": [
            144,
            326,
            594,
            340
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "当左移移出的数据位为“1”时，发生溢出。",
        "bbox": [
            146,
            344,
            473,
            357
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "对于补码的算数左移。符号位不变，高位移出，低位补0；当左移移出的数据位正数为1负数为0时（符号位与被移出的位不同），发生溢出。一次。为保证不发生溢出，移位数据的最高有效位必须与符号位相同",
        "bbox": [
            144,
            363,
            835,
            414
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "因此，在硬件补码实现算数左移时，直接将数据的最高有效位移入符号位，当不发生溢出时，不会改变机器数的符号",
        "bbox": [
            144,
            418,
            836,
            451
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "右移",
        "text_level": 1,
        "bbox": [
            146,
            498,
            200,
            517
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "逻辑右移，低位移出，高位补0 ",
        "bbox": [
            144,
            558,
            394,
            571
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "对于原码的算数右移，符号位不变，低位移出，高位补0",
        "bbox": [
            144,
            577,
            586,
            590
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "算数右移 ",
        "bbox": [
            146,
            595,
            221,
            609
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "对于补码，符号位不变，低位移出，高位补符号位",
        "bbox": [
            144,
            614,
            537,
            627
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "对于原码，符号位不变，低位移出，高位补0",
        "bbox": [
            144,
            633,
            499,
            646
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "C语言中一个特性就是支持按位进行布尔运算（位运算）",
        "bbox": [
            144,
            688,
            576,
            702
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "位运算的用法就是实现掩码运算",
        "bbox": [
            146,
            707,
            396,
            721
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "特定的位序列 ",
        "bbox": [
            146,
            725,
            255,
            739
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "比如说和0xFF，进行与运算，就是其本身",
        "bbox": [
            146,
            744,
            472,
            758
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "5、机器数编码与真值 ",
        "text_level": 1,
        "bbox": [
            144,
            803,
            408,
            824
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "为什么原码、补码、反码、移码 作为机器数的时候，符号位算作 $2 \\land \\mathsf { n ? }$ ",
        "bbox": [
            144,
            869,
            692,
            883
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "关于移码",
        "bbox": [
            146,
            887,
            221,
            902
        ],
        "page_idx": 16
    },
    {
        "type": "text",
        "text": "以 8 位数为例，总共能表示 256 个数，把这些数加上一个固定的值，从而形成新的码值（还是 8 位），这就是移码的定义。例如，可以把有符号数映射到 0 - 255 的段上。",
        "bbox": [
            144,
            93,
            847,
            127
        ],
        "page_idx": 17
    },
    {
        "type": "text",
        "text": "移码的优势：原来的大小关系不变，且一一对应（没有两种表示的 0），很容易判断大小（如判断是最小值或者最大值）",
        "bbox": [
            144,
            130,
            847,
            165
        ],
        "page_idx": 17
    },
    {
        "type": "text",
        "text": "64 为机器上，不同的数据类型，所占的字节数不同，数值范围取值不同",
        "bbox": [
            144,
            167,
            702,
            183
        ],
        "page_idx": 17
    },
    {
        "type": "text",
        "text": "Long 在 64 位机器上占 8 个字节 32 位机器上，long 占 4 个字节",
        "bbox": [
            144,
            186,
            643,
            202
        ],
        "page_idx": 17
    },
    {
        "type": "text",
        "text": "Unsigned关键字 数字只能为非负数，无符号数",
        "bbox": [
            144,
            204,
            522,
            219
        ],
        "page_idx": 17
    },
    {
        "type": "table",
        "img_path": "images/d4b7fb7f45843a9c1fd0ec69762e3eee3776f4c1067cb3e72e15e7fcb0f4a688.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>C data type</td><td>Min</td><td>Hexadecimal</td><td>Max</td><td>Hexadecimal</td><td>Bytes</td><td></td><td></td></tr><tr><td>[signed] char</td><td>-2^7</td><td>0x80</td><td>2^7-1</td><td>0x7F</td><td>1</td><td></td><td></td></tr><tr><td>Unsigned char</td><td>0</td><td></td><td>2^8-1</td><td>0xFF</td><td>1</td><td></td><td></td></tr><tr><td>Short</td><td>-2^15</td><td>0x8000</td><td>2^15-1</td><td>0x7FFF</td><td>2</td><td></td><td></td></tr><tr><td>Unsigned short</td><td>0</td><td></td><td>2^16-1</td><td>0xFFFFFF</td><td>2</td><td></td><td></td></tr><tr><td>Int</td><td>-2^31</td><td>0x8(7个0)</td><td>2^31-1</td><td>0x7(7个F)</td><td>4</td><td></td><td></td></tr><tr><td>Unsigned int</td><td>0</td><td></td><td>2^32-1</td><td>0x(8个F)</td><td>4</td><td></td><td></td></tr><tr><td>Long</td><td>-2^63</td><td>0x8(15个0)</td><td>2^63-1</td><td>0x7(15个F)</td><td>8</td><td></td><td></td></tr><tr><td>Unsigned long</td><td>0</td><td></td><td>2^64-1</td><td>0x(16个F)</td><td>8</td><td></td><td></td></tr><tr><td>Long long</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Int32_t</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Uint 32_t</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Int 64_t</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Uint64_t</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Float</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Double</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Long double</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>",
        "bbox": [
            139,
            221,
            1000,
            583
        ],
        "page_idx": 17
    },
    {
        "type": "image",
        "img_path": "images/1a41381584803073f6746fb38769bedaa0499f690915a2f9652a86f1e498a1d5.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            601,
            776,
            827
        ],
        "page_idx": 17
    },
    {
        "type": "text",
        "text": "假设一个整数的数据类型有w位，用向量x表示",
        "bbox": [
            144,
            845,
            524,
            860
        ],
        "page_idx": 17
    },
    {
        "type": "text",
        "text": "For vector $\\vec { x } = [ x _ { w - 1 } , x _ { w - 2 } , \\cdots , x _ { 0 } ]$ ",
        "bbox": [
            146,
            870,
            410,
            890
        ],
        "page_idx": 17
    },
    {
        "type": "equation",
        "text": "$$\nB 2 U _ {w} (\\vec {x}) \\doteq x _ {w - 1} \\cdot 2 ^ {w - 1} + x _ {w - 2} \\cdot 2 ^ {w - 2} \\dots\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            91,
            448,
            108
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "B2U 的意思是 binary to unsigned",
        "bbox": [
            144,
            130,
            420,
            146
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "对于有符号数的编码采取补码的方式",
        "bbox": [
            146,
            149,
            433,
            164
        ],
        "page_idx": 18
    },
    {
        "type": "equation",
        "text": "$$\nB 2 T _ {w} (\\vec {x}) \\dot {=} x _ {w - 1} \\cdot - 2 ^ {w - 1} + x _ {w - 2} \\cdot 2 ^ {w - 2} \\dots\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            166,
            465,
            181
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "这里最高位为1时表示负数，最高位为0时表示非负数",
        "bbox": [
            144,
            204,
            574,
            219
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "最高位也叫做符号位",
        "bbox": [
            146,
            223,
            310,
            237
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "关于符号位，需要理解负权重的概念，而不能简单的当成一个负号",
        "bbox": [
            144,
            241,
            662,
            256
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "记住对于无符号数，最高位的1表示的不是权重",
        "bbox": [
            146,
            260,
            521,
            275
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "也就是说， $- 2 \\land 3 = - 8$ ",
        "bbox": [
            146,
            279,
            305,
            294
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "-1在有符号数全为1，但在无符号数为最大值",
        "bbox": [
            146,
            297,
            502,
            312
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "如果在计算的时候一个是有符号数，一个是无符号数，",
        "bbox": [
            144,
            316,
            563,
            332
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "C语言会隐式地将有符号数转换为无符号数",
        "bbox": [
            144,
            334,
            482,
            349
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "6、溢出与取模运算的数学关系",
        "text_level": 1,
        "bbox": [
            144,
            411,
            515,
            434
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "设我们有两个 w 位无符号整数 a 和 b，其和为 S，即",
        "bbox": [
            144,
            476,
            556,
            493
        ],
        "page_idx": 18
    },
    {
        "type": "equation",
        "text": "$$\nS = a + b\n$$",
        "text_format": "latex",
        "bbox": [
            146,
            497,
            221,
            510
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "由于二进制表示限定为 w 位，系统只能表示 0 到 2w−1 内的数。因此，任何 S 超出这一范围的部分都会被丢弃。用数学语言描述就是：实际存储的结果 R 为",
        "bbox": [
            144,
            514,
            847,
            548
        ],
        "page_idx": 18
    },
    {
        "type": "equation",
        "text": "$$\nR = S \\bmod 2 ^ {\\wedge} w\n$$",
        "text_format": "latex",
        "bbox": [
            146,
            552,
            265,
            565
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "也就是说，在加法运算中，丢弃溢出位的操作等同于计算 S 对 $_ { 2 } \\wedge _ { \\mathsf { W } }$ 取模。这正是计算机硬件中处理无符号整数溢出的方式",
        "bbox": [
            144,
            570,
            847,
            602
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "很多人可能会疑惑，既然阶码字段有 8 位，那么为什么不选择 $2 ^ { \\wedge } 7 = 1 2 8$ 作为偏移量？原因在于：",
        "bbox": [
            144,
            607,
            847,
            640
        ],
        "page_idx": 18
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "对称分布的需求：以 127 为偏移量，可以使得存储阶码为 127 时实际指数为 0。这种设计使得正指数和负指数在规格化数中分布较为对称，便于硬件实现和算法设计。",
            "历史约定与标准化：IEEE754 标准规定的偏移量就是 127，它的选择经过广泛验证并且与现有的硬件架构和软件设计高度契合。采用 127 而非 128 使得编码与译码的过程更加简便，同时避免了 0 不对称的问题。",
            "具体来说，设若采用 128 作为偏移量，则当存储阶码 E 为 128 时，实际指数为0；但这会使得整个指数范围整体右移，从而使得可表示的最小负指数与最大正指数的数量不均衡，不符合 IEEE754 对于规格化数的要求。选择 127 则能使得 0 成为一个中心值，既便于表达接近1 的数值，又能合理覆盖较大范围的指数。"
        ],
        "bbox": [
            174,
            644,
            847,
            824
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "5.3. 关于阶码真值为 -127 和 128",
        "text_level": 1,
        "bbox": [
            144,
            829,
            406,
            844
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "一般我们正常探讨的阶码区间是 $- 1 2 6 \\mathsf { D } \\sim 1 2 7 \\mathsf { D }$ ，而真值 -127D 的阶码为 0000 0000B，真值 128D 的阶码为 1111 1111B。",
        "bbox": [
            144,
            848,
            836,
            882
        ],
        "page_idx": 18
    },
    {
        "type": "text",
        "text": "5.3.1. 阶码真值为 -127",
        "text_level": 1,
        "bbox": [
            144,
            93,
            329,
            108
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "当阶码全为 0 ，尾数不全为 0，表示 非规格化小数 ，用来表示比最小绝对值还要小的数，即",
        "bbox": [
            144,
            112,
            836,
            143
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "尾数码 隐含的最高位不是 1，而是 0；",
        "bbox": [
            144,
            148,
            436,
            164
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "阶码真值 固定为 -126，而非 -127；",
        "bbox": [
            144,
            168,
            420,
            183
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "当阶码全为 0 ，尾数全为 0，表示 真值 $+ / - 0$ ",
        "bbox": [
            144,
            186,
            505,
            200
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "5.3.2. 阶码真值为 128",
        "text_level": 1,
        "bbox": [
            144,
            204,
            324,
            219
        ],
        "page_idx": 19
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "1. 当阶码全为 1 ，尾数全为 0，表示 正负无穷大 +/- ∞",
            "2. 当阶码全为 1 ，尾数不全为 0，表示非数值 NaN（Not a Number）"
        ],
        "bbox": [
            174,
            223,
            727,
            256
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "如 0/0， $\\infty - \\infty$ 等非法运算的结果即为 NaN",
        "bbox": [
            144,
            260,
            478,
            275
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "汉字输入法程序：将汉字输入计算机转换成汉字内码",
        "bbox": [
            144,
            278,
            557,
            294
        ],
        "page_idx": 19
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "1、输入—汉字输入码，也称作外码， 由西文字符编码而成（拼音编码、字形编码等）",
            "2、存储、交换和检索—内码 ，两个字节表示。汉字内码在计算机中是唯一的。（区位码、国标码、汉字内码2个字节最高位均为“1”）",
            "3、交换—交换码，是指不同的具有汉字处理功能的计算机系统之间在交换汉字信息所用的代码标准。",
            "4、输出——字形码 点阵表示法 字模码：用于汉字的显示和打印"
        ],
        "bbox": [
            144,
            297,
            853,
            405
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "汉字字库——— 所有汉字的字模点阵代码按顺序集中存放根据内码查表",
        "bbox": [
            174,
            407,
            727,
            423
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "字形检索程序：将汉字的机内代码转化为汉字的字形码",
        "bbox": [
            174,
            426,
            603,
            442
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "整数的运算 ",
        "text_level": 1,
        "bbox": [
            146,
            463,
            238,
            478
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "计算值： $x { + } y$ ",
        "bbox": [
            146,
            482,
            250,
            498
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "实际值：计算机中实际上保存的结果",
        "bbox": [
            144,
            501,
            433,
            516
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "${ } _ { w y } ^ { w }$ $w$ ",
        "bbox": [
            144,
            538,
            818,
            577
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "溢出时，计算值 $\\mathop {    }$ 实际值 $\\pm 2 \\land \\_$ （这里相当于是原码！）",
        "bbox": [
            144,
            593,
            564,
            609
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "如何判定运算结果是否发生了溢出",
        "bbox": [
            146,
            612,
            415,
            627
        ],
        "page_idx": 19
    },
    {
        "type": "code",
        "sub_type": "algorithm",
        "code_caption": [],
        "code_body": "Int uadd.ok(unsigned x,unsigned y)   \n{ unsigned sum $\\equiv$ x+y; If (sum $\\rightharpoondown$ x)   \nReturn 1; else return 0;   \n} ",
        "bbox": [
            144,
            633,
            442,
            778
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "有符号整数",
        "text_level": 1,
        "bbox": [
            146,
            785,
            238,
            800
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "为了避免数据大小的扩张，最终结果将截断为w位；即实际上数字只占w-1位两个异号的数字肯定不会溢出",
        "bbox": [
            144,
            804,
            754,
            838
        ],
        "page_idx": 19
    },
    {
        "type": "text",
        "text": "两个同号的才有可能溢出",
        "bbox": [
            146,
            841,
            344,
            856
        ],
        "page_idx": 19
    },
    {
        "type": "image",
        "img_path": "images/3390337029ead83d93ec3a52189a1c769867939c392af0161ac824c78e907384.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            89,
            682,
            312
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "正溢出/上溢",
        "bbox": [
            147,
            315,
            248,
            331
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "负溢出/下溢 ",
        "bbox": [
            147,
            332,
            247,
            349
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "减法转换成加法来做 ",
        "bbox": [
            147,
            351,
            310,
            368
        ],
        "page_idx": 20
    },
    {
        "type": "code",
        "sub_type": "algorithm",
        "code_caption": [],
        "code_body": "$x - y = x + (-y) = x + (-y + 1)$ ",
        "bbox": [
            147,
            388,
            334,
            406
        ],
        "page_idx": 20
    },
    {
        "type": "image",
        "img_path": "images/28aaa54c06c24037d9b1537962c7c3302913f8ecd66b2e073b85e38b433cb4c3.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            406,
            677,
            602
        ],
        "page_idx": 20
    },
    {
        "type": "equation",
        "text": "$$\nF o r x a n d y, x + \\mathbf {\\Lambda} _ {w} ^ {t} y = \\left\\{ \\begin{array}{l l} x + y - 2 ^ {w - 1} - 2 ^ {w - 1} = x + y - 2 ^ {w}, 2 ^ {w - 1} \\leq x + y, \\text {正 溢 出} \\\\ x + y, - 2 ^ {w - 1} \\leq x + y <   2 ^ {w - 1} \\\\ x + y + 2 ^ {w}, x + y <   - 2 ^ {w - 1}, \\text {负 溢 出} \\end{array} \\right.\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            686,
            764,
            744
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "对于正溢出，正溢出实际上是让符号位从 1变成0，计算值 $\\equiv$ 实际值 $+ 2 \\land _ { \\mathsf { W } , }$ ,它没被截断，最高位由0变成了1，这两个数本来就没有- $\\mathbf { \\mathcal { Z } ^ { \\wedge } }$ （w-1)的权重结果有了，那么实际值就要加上2^（w-1），又因为补码的定义，又得减去 $2 \\setminus ( \\mathsf { w } - 1 )$ ",
        "bbox": [
            144,
            760,
            848,
            813
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "对于负溢出，计算值 $=$ 实际值- ${ \\mathcal { 2 } } ^ { \\wedge } \\mathsf { w }$ ，这里因为原来两个最高位符号位从 1变成0，两个数本来有- ${ \\mathcal { 2 } } ^ { \\wedge } \\mathsf { w }$ 的权重结果没了。那么实际值就要减去个- $. 2 \\land _ { \\mathsf { W } }$ ",
        "bbox": [
            144,
            816,
            848,
            850
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "如何判断溢出？",
        "bbox": [
            146,
            852,
            265,
            868
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "两个正数相加，得到结果为负，正溢出",
        "bbox": [
            144,
            871,
            450,
            887
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "两个负数相加，得到结果 $\\geqslant 0$ ，负溢出",
        "bbox": [
            146,
            890,
            443,
            904
        ],
        "page_idx": 20
    },
    {
        "type": "text",
        "text": "加法逆元",
        "bbox": [
            144,
            93,
            221,
            108
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\nF o r x, 0 \\leq x <   2 ^ {w}, x + x ^ {\\prime} = x ^ {\\prime} + x = 0\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            110,
            436,
            126
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\ny - x - > y + x ^ {\\prime}.\n$$",
        "text_format": "latex",
        "bbox": [
            144,
            149,
            226,
            165
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "对于无符号整型来说， $\\mathsf { x } + \\mathsf { x } ^ { \\prime } { = } 2 \\mathsf { \\Lambda } \\mathsf { w } { = } 0$ ",
        "bbox": [
            144,
            167,
            423,
            183
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\nx ^ {\\prime} = \\left\\{ \\begin{array}{l} x, x = 0 \\\\ 2 ^ {w} - x, x > 0 \\end{array} \\right.\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            186,
            305,
            225
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "对于补码表示的有符号数的逆元比较简单",
        "bbox": [
            144,
            241,
            468,
            256
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\nx ^ {\\prime} = \\left\\{ \\begin{array}{l} - x, x > T M i n _ {w} \\\\ T M i n _ {w}, x = T M i n _ {w} \\end{array} \\right.\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            260,
            349,
            300
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "由于补码最大值比最小值的绝对值要小",
        "bbox": [
            144,
            315,
            452,
            331
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "即 $0 1 1 1 < 1 0 0 0$ ",
        "bbox": [
            146,
            334,
            263,
            348
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "关于 最小值的逆元要通过负溢出 的方法来实现",
        "bbox": [
            144,
            351,
            515,
            368
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "即 ",
        "bbox": [
            147,
            370,
            169,
            385
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\nT \\min  _ {w} + T \\min  _ {w} = - 2 ^ {w} = 0\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            388,
            371,
            404
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "X、y 都为 w 位，乘积结果可能为 2w 位，c 语言定义无符号数乘法所产生的结果是 w 位因此，z=xy mod $_ { 2 } \\wedge _ { \\mathsf { W } }$ ",
        "bbox": [
            144,
            426,
            823,
            461
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "对于有符号数，我们有 z=U2T(xymod2^w)",
        "bbox": [
            146,
            464,
            484,
            480
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "X’y’ mod 2^w=(xy) mod ${ 2 } ^ { \\wedge } \\mathsf { w } .$ .即有符号整数和无符号整数高位截断后结果的位级表示相同整数的乘法往往利用移位运算（拆解成与多个 $2 ^ { \\land } \\mathsf { k }$ 相乘再相加减）",
        "bbox": [
            144,
            482,
            842,
            516
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "整数的除法遇到除不尽的情况，总是向0舍入",
        "bbox": [
            146,
            519,
            505,
            535
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "但是，移位的时候会导致向下舍入。为此，我们要在移位之前加入偏置。",
        "bbox": [
            146,
            538,
            705,
            552
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "即如果要右移 k 位，在低 k 位加上 $2 \\land k - 1$ , 向 $k { + 1 }$ 产生一个进位，实现了向 0 取整。",
        "bbox": [
            144,
            556,
            779,
            571
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "即用整除实现了向上取整 ",
        "bbox": [
            146,
            575,
            346,
            590
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "举个例子：",
        "bbox": [
            146,
            593,
            228,
            608
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\nK = 0\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            612,
            183,
            626
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\n1 1 0 0 1 1 1 1 1 1 0 0 1 1 0 0 - 1 2 3 4 0\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            630,
            374,
            644
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\nK = 4 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 - 7 7 2 \\text {而} 1 2 3 4 0 / 2 ^ {\\wedge} k = - 7 7 1. 2 5;\n$$",
        "text_format": "latex",
        "bbox": [
            146,
            649,
            576,
            665
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "加上偏置，1100111111011011，右移四位有 1111110011111101,即-771。",
        "bbox": [
            144,
            667,
            737,
            683
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "division by a power of 2 ",
        "bbox": [
            184,
            684,
            381,
            700
        ],
        "page_idx": 21
    },
    {
        "type": "equation",
        "text": "$$\n(x <   0? x + (1 <   <   k) - 1: x) > > K\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            705,
            416,
            722
        ],
        "page_idx": 21
    },
    {
        "type": "text",
        "text": "但是，除以2不能推广到除以任意整数浮点数",
        "bbox": [
            144,
            741,
            450,
            776
        ],
        "page_idx": 21
    },
    {
        "type": "table",
        "img_path": "images/daa5fa94b901bcc90c2370bb8aa5a419ea390821b2b4d9cefc8f3c2732dcf0f0.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>类型</td><td>总 位 数</td><td>尾数</td><td>阶码</td><td>真值计算</td><td></td><td></td></tr><tr><td>短 实 数</td><td>32</td><td>24</td><td>8</td><td>\\( N = {\\left( -1\\right) }^{M} \\times  \\left( {{1.5}{M}_{1}M{2\\ldots }{M}_{n}}\\right)  \\times  {2}^{E - {127}} \\)</td><td></td><td></td></tr><tr><td>长 实 数</td><td>64</td><td>53</td><td>11</td><td>\\( N = {\\left( -1\\right) }^{M} \\times  \\left( {{1.5}{M}_{1}M{2\\ldots }{M}_{n}}\\right)  \\times  {2}^{E - {1023}} \\)</td><td></td><td></td></tr><tr><td>临 时 实数</td><td>80</td><td>65</td><td>15</td><td></td><td></td><td></td></tr></table>",
        "bbox": [
            137,
            154,
            858,
            305
        ],
        "page_idx": 22
    },
    {
        "type": "image",
        "img_path": "images/3caf6d389607f56b60584b40fcc4fecb687f2270ed1d9b484c2da9a93b7e2872.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            149,
            367,
            890,
            633
        ],
        "page_idx": 22
    },
    {
        "type": "text",
        "text": "符号位 阶码 尾数",
        "bbox": [
            147,
            649,
            284,
            665
        ],
        "page_idx": 22
    },
    {
        "type": "text",
        "text": "7、IEEE754 ",
        "text_level": 1,
        "bbox": [
            147,
            728,
            295,
            747
        ],
        "page_idx": 22
    },
    {
        "type": "text",
        "text": "Float32bit ",
        "bbox": [
            147,
            791,
            236,
            807
        ],
        "page_idx": 22
    },
    {
        "type": "text",
        "text": "Double64bit ",
        "bbox": [
            147,
            810,
            253,
            826
        ],
        "page_idx": 22
    },
    {
        "type": "text",
        "text": "",
        "bbox": [
            410,
            174,
            492,
            192
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "我梦里的财富：+302657264526￥",
        "bbox": [
            176,
            210,
            557,
            231
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "",
        "bbox": [
            719,
            174,
            821,
            192
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "阶码",
        "bbox": [
            877,
            181,
            921,
            199
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "y ",
        "bbox": [
            589,
            237,
            640,
            259
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "符号",
        "bbox": [
            662,
            237,
            704,
            255
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "尾数",
        "bbox": [
            759,
            237,
            803,
            254
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "",
        "bbox": [
            850,
            237,
            895,
            254
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "符号：决定数值的正负性",
        "bbox": [
            168,
            294,
            391,
            311
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "尾数：影响数值的精度。尾数的位数越多，精度越高",
        "bbox": [
            169,
            312,
            626,
            328
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "阶码：反映小数点的实际位置",
        "bbox": [
            169,
            329,
            428,
            344
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "基数：K进制通常默认基数为K",
        "bbox": [
            169,
            346,
            433,
            362
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "规格化：确保尾数的最高位非0数位刚好在小数点之前",
        "bbox": [
            169,
            363,
            636,
            379
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "阶码确定范围 ",
        "bbox": [
            147,
            388,
            257,
            405
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "尾数影响精度",
        "bbox": [
            147,
            407,
            257,
            423
        ],
        "page_idx": 23
    },
    {
        "type": "image",
        "img_path": "images/79f181b47490d71aa33641df7b5c4485f39a62657deff27543ee4ad27dd2b53e.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            439,
            704,
            543
        ],
        "page_idx": 23
    },
    {
        "type": "equation",
        "text": "$$\nV = (- 1) ^ {S} \\times M \\times 2 ^ {E}\n$$",
        "text_format": "latex",
        "bbox": [
            147,
            609,
            307,
            627
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "尾数用原码定点小数表示",
        "bbox": [
            144,
            649,
            347,
            665
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "阶码用移码，规定偏置值为127 ",
        "bbox": [
            144,
            667,
            396,
            683
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "$\\mathsf { S } { = } 0 _ { - }$ ,正数； $s { = } 1$ 负数；M 为小数部分，尾数部分，frac。E 为指数部分，阶码，exp。",
        "bbox": [
            144,
            686,
            794,
            702
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "Emin=1.emax $= 2 5 4$ ，对半分，所以要减去 $2 5 4 / 2 { = } 1 2 7$ ；",
        "bbox": [
            146,
            705,
            579,
            720
        ],
        "page_idx": 23
    },
    {
        "type": "text",
        "text": "第一位总是1，因此没必要显示出来，所以尾数部分要加1",
        "bbox": [
            147,
            722,
            600,
            738
        ],
        "page_idx": 23
    },
    {
        "type": "image",
        "img_path": "images/e50dc1d79cdffb23905de3ed3b7c0658a8254a152177a16d4d0e0392f652513b.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            149,
            740,
            489,
            857
        ],
        "page_idx": 23
    },
    {
        "type": "image",
        "img_path": "images/bd23b66fa0ae5d5aa0cccc7dda113d13d37aca406c550155e1c82dd36201b0e2.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            143,
            680,
            332
        ],
        "page_idx": 24
    },
    {
        "type": "text",
        "text": "如何将十进制真值转换为偏置值为M的移码？",
        "bbox": [
            184,
            338,
            571,
            356
        ],
        "page_idx": 24
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "②按“无符号整数”规则转换为指定位数"
        ],
        "bbox": [
            186,
            372,
            546,
            405
        ],
        "page_idx": 24
    },
    {
        "type": "text",
        "text": "小数点前的 1 省略了（隐藏了 1）",
        "text_level": 1,
        "bbox": [
            146,
            445,
            400,
            460
        ],
        "page_idx": 24
    },
    {
        "type": "image",
        "img_path": "images/d598243f6708b4a1a023068860747b875a9ef2e74e3149a5cb201ad75a8e9e35.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            461,
            858,
            705
        ],
        "page_idx": 24
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "1、当阶码字段二进制位不全为 0，也不全为 1 时，（0 和 255），规格化",
            "2、当阶码字段全为 0，非规格化.1、尾数部分也全为 0，则当 $\\mathsf { S } { = } 0$ ，表示正 0， $s { = } 1$ ，负0；"
        ],
        "bbox": [
            144,
            741,
            845,
            794
        ],
        "page_idx": 24
    },
    {
        "type": "text",
        "text": "表示非常接近 0 的数；如果尾数不为 0，则 $\\mathsf { E } { = } \\mathsf { 1 }$ -bias， $\\mathsf { M } = \\mathsf { f }$ 不加 1",
        "bbox": [
            146,
            797,
            655,
            813
        ],
        "page_idx": 24
    },
    {
        "type": "header",
        "text": "单精度记得减去 127e-bias",
        "bbox": [
            147,
            93,
            359,
            108
        ],
        "page_idx": 24
    },
    {
        "type": "image",
        "img_path": "images/650d5305479445f75aede3bdffbb25a65884bf601e7cfc1f140fcc4261742161.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            89,
            781,
            305
        ],
        "page_idx": 25
    },
    {
        "type": "text",
        "text": "3、当阶码字段全为 1，特殊值；当尾数为 0 时， $\\mathsf { S } { = } 0$ ，正无穷； $s { = } 1$ ，负无穷；当尾数不为0时，表示NaN表示不是一个数",
        "bbox": [
            146,
            315,
            848,
            348
        ],
        "page_idx": 25
    },
    {
        "type": "image",
        "img_path": "images/c7544ae05a23243dd7e02061d4e04648f67639f1185b2a400c3cdfb32356d57d.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            349,
            776,
            549
        ],
        "page_idx": 25
    },
    {
        "type": "table",
        "img_path": "images/14c33bdab70e592aaf0ccde21c71194aa3140aa51f19aa17576c208ea689fdc7.jpg",
        "table_caption": [
            "单精度为例"
        ],
        "table_footnote": [
            "NaN:非数 (not a number)"
        ],
        "table_body": "<table><tr><td>Ms</td><td>E</td><td>M</td><td>意义</td></tr><tr><td>0/1</td><td>0</td><td>0</td><td>±0</td></tr><tr><td>0/1</td><td>0</td><td>非0</td><td>非规格化数</td></tr><tr><td>0/1</td><td>1~254</td><td>任意</td><td>规格化数</td></tr><tr><td>0/1</td><td>255</td><td>0</td><td>±无穷大</td></tr><tr><td>0/1</td><td>255</td><td>非0</td><td>NaN</td></tr></table>",
        "bbox": [
            169,
            575,
            477,
            712
        ],
        "page_idx": 25
    },
    {
        "type": "table",
        "img_path": "images/905041adb2aacd5eb3288df88fa734e9d7f1bbccff80e53ea0dcd1c85fb214b7.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>0</td><td>J J J J J J</td><td>J J………J J</td><td>H9N</td></tr><tr><td>0</td><td>J J J J J J</td><td>……</td><td>H9N</td></tr><tr><td>0</td><td>J J J J J J</td><td>00………0J</td><td>H9N</td></tr><tr><td>0</td><td>J J J J J J</td><td>00………00</td><td>+∞</td></tr><tr><td>0</td><td>J J J J J J</td><td>J J………J J</td><td>粤羊锁怀正貌</td></tr><tr><td>0</td><td>……</td><td>……</td><td>锁怀正貌</td></tr><tr><td>0</td><td>0000000J</td><td>00………00</td><td>粤羊锁怀正貌</td></tr><tr><td>0</td><td>00000000</td><td>J J………J J</td><td>粤羊非锁怀正貌</td></tr><tr><td>0</td><td>……</td><td>……</td><td>非锁怀正貌</td></tr><tr><td>0</td><td>00000000</td><td>00………0J</td><td>粤羊非锁怀正貌</td></tr><tr><td>0</td><td>00000000</td><td>00………00</td><td>+0</td></tr><tr><td>W2</td><td>E</td><td>W</td><td>解锁</td></tr></table>",
        "bbox": [
            166,
            744,
            415,
            892
        ],
        "page_idx": 25
    },
    {
        "type": "table",
        "img_path": "images/c4d438acd9a66d9110bfe24f582ea5e1e5761d34adbaaf54d1ddda5ab8206457.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>J</td><td>J J J J J J J</td><td>J J………J J</td><td>U9U</td></tr><tr><td>J</td><td>J J J J J J J</td><td>……</td><td>U9U</td></tr><tr><td>J</td><td>J J J J J J J</td><td>00………0J</td><td>U9U</td></tr><tr><td>J</td><td>J J J J J J J</td><td>00………00</td><td>--∞</td></tr><tr><td>J</td><td>J J J J J J J</td><td>J J………J J</td><td>晋1非顿报快改新</td></tr><tr><td>J</td><td>………</td><td>………</td><td>顿报快改新</td></tr><tr><td>J</td><td>0000000J</td><td>00………00</td><td>晋1非顿报快改新</td></tr><tr><td>J</td><td>00000000</td><td>J J………J J</td><td>晋1非顿报快改新</td></tr><tr><td>J</td><td>………</td><td>………</td><td>非顿报快改新</td></tr><tr><td>J</td><td>00000000</td><td>00………0J</td><td>晋1非顿报快改新</td></tr><tr><td>J</td><td>00000000</td><td>00………00</td><td>-0</td></tr><tr><td>W2</td><td>E</td><td>W</td><td>熟瑶</td></tr></table>",
        "bbox": [
            431,
            741,
            678,
            892
        ],
        "page_idx": 25
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·阶码：是2n-1的移码， $\\mathtt { E } =$ [E']移=2n-1+E' ",
            "·隐藏位：单、双精度浮点数，尾数规格化的“1”，放置于整数位，并将其隐藏；临时实数无隐藏位",
            "■符号位：尾数的符号位Ms在最高位"
        ],
        "bbox": [
            149,
            91,
            655,
            155
        ],
        "page_idx": 26
    },
    {
        "type": "table",
        "img_path": "images/a8de82aae0dab15c57a2a4b539d59e65ebc8094ec0467130528b436ab139841c.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>类型</td><td>真值计算</td></tr><tr><td>单精度</td><td>规格化: \\( \\mathrm{N} = \\left( {-1}\\right) {}^{\\mathrm{{Ms}} \\times  }\\left( {{1.}{\\mathrm{M}}_{1}{\\mathrm{M}}_{2}\\cdots {\\mathrm{M}}_{\\mathrm{n}}}\\right)  \\times  {2}^{\\mathrm{E} - {127}} \\) 非规格化: \\( \\mathrm{N} = \\left( {-1}\\right) {}^{\\mathrm{{Ms}} \\times  }\\left( {{0.}{\\mathrm{M}}_{1}{\\mathrm{M}}_{2}\\cdots {\\mathrm{M}}_{\\mathrm{n}}}\\right)  \\times  {2}^{-{126}} \\)</td></tr><tr><td>双精度</td><td>规格化: \\( \\mathrm{N} = \\left( {-1}\\right) {}^{\\mathrm{{Ms}} \\times  }\\left( {{1.}{\\mathrm{M}}_{1}{\\mathrm{M}}_{2}\\cdots {\\mathrm{M}}_{\\mathrm{n}}}\\right)  \\times  {2}^{\\mathrm{E} - {1023}} \\) 非规格化: \\( \\mathrm{N} = \\left( {-1}\\right) {}^{\\mathrm{{Ms}} \\times  }\\left( {{0.}{\\mathrm{M}}_{1}{\\mathrm{M}}_{2}\\cdots {\\mathrm{M}}_{\\mathrm{n}}}\\right)  \\times  {2}^{-{1022}} \\)</td></tr></table>",
        "bbox": [
            203,
            164,
            611,
            254
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "例3.10若X和Y均是IEEE754标准的单精度浮点数。",
        "bbox": [
            164,
            280,
            549,
            294
        ],
        "page_idx": 26
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "（1）若× $=$ -135.625，求X的规格化浮点数表示。",
            "(2）若浮点数Y的存储形式为41360000H，求Y的真值。"
        ],
        "bbox": [
            184,
            298,
            603,
            330
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "（1）真值→IEEE754规格化单精度浮点数",
        "bbox": [
            157,
            335,
            472,
            350
        ],
        "page_idx": 26
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\textcircled{1}$ 写出数据的二进制真值 $\\mathbf { x } =$ (-10000111.101） 2",
            "$\\textcircled{2}$ 转换为M $\\times 2 ^ {  E }$ 的形式：M' ${ \\bf \\delta } = \\pm 1 . \\times { \\bf x } \\ldots \\times$ ，E'为整数"
        ],
        "bbox": [
            157,
            351,
            571,
            384
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "X=-1.0000111101×27 M'=-1.0000111101 E'=+7 ",
        "bbox": [
            176,
            386,
            673,
            400
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "： $\\textcircled{3}$ 写出尾数M'的原码，尾数数值隐藏（舍去）整数位的“1\"",
        "bbox": [
            157,
            403,
            589,
            419
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "$\\boldsymbol { \\ M } _ { S } = 1$ 尾数数值M $\\mathtt { \\mathtt { = 0 0 0 } }$ 0111 1010 0000 0000 0000",
        "bbox": [
            176,
            420,
            633,
            435
        ],
        "page_idx": 26
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "： $\\textcircled{4}$ 写出阶码E'的移码E： $\\mathsf { E } = [ \\mathsf { E } ^ { \\prime } ] _ { \\scriptscriptstyle 1 \\mathscr { B } } = 1 2 7 + \\mathsf { E } ^ { \\prime } = 1 2 7 + 7 = 1 3 4 = 1 0 0 ($ 00110B",
            "： $\\textcircled{5}$ 按照格式排列E和M：即MsEM"
        ],
        "bbox": [
            157,
            437,
            668,
            469
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "$[ \\mathsf { X } ] _ { \\overrightarrow { \\jmath } } = \\uparrow$ 10000110 000 0111 1010 0000 0000 0000B=C307A000H ",
        "bbox": [
            176,
            470,
            623,
            483
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "例3.10（2）浮点数 真值",
        "text_level": 1,
        "bbox": [
            168,
            530,
            405,
            546
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "阶码8位，2n-1的移码",
        "text_level": 1,
        "bbox": [
            431,
            519,
            527,
            546
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "$\\textcircled{1}$ 浮点数的二进制编码：按照格式分，写出M、阶码E和尾数数值M ",
        "bbox": [
            189,
            550,
            687,
            565
        ],
        "page_idx": 26
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} \\cdot [ \\mathrm {Y} ] _ {\\text {浮}} = 4 1 3 6 0 0 0 0 \\mathrm {H} = 0 1 0 0 / 0 0 0 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 B \\\\ \\cdot \\mathrm {M} _ {\\mathrm {s}} = 0 \\quad \\mathrm {E} = 1 0 0 0 0 0 1 0 \\mathrm {B} = 1 3 0 \\quad \\mathrm {M} = 0 1 1 0 1 1 0 0 0 0 0 0 0 \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            213,
            569,
            729,
            602
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "添加隐 ·阶码编码E不是全0也不是全1，可判定Y是规格化浮点数",
        "bbox": [
            147,
            606,
            608,
            620
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "藏位1写出尾数的真值M’： $\\pmb { M } _ { S } \\mathbf { = } 0$ ，表明是正数添加隐藏位1 ",
        "bbox": [
            147,
            623,
            626,
            639
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "数符+ ",
        "bbox": [
            157,
            651,
            544,
            664
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "求出阶码的真值E'：Y是单精度浮点数，故E'=E-127=130-127=3 ",
        "bbox": [
            210,
            661,
            675,
            675
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "",
        "bbox": [
            189,
            678,
            445,
            694
        ],
        "page_idx": 26
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} Y = M ^ {\\prime} \\times 2 ^ {E ^ {\\prime}} = + 1. 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \\times 2 ^ {3} \\\\ = + 1 0 1 1. 0 1 1 B = + 1 1. 3 7 5 \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            189,
            678,
            596,
            728
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "但是，浮点数只能近似表示实数运算",
        "bbox": [
            146,
            741,
            433,
            757
        ],
        "page_idx": 26
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "1、向上舍入",
            "2、向下舍入",
            "3、向零舍入"
        ],
        "bbox": [
            147,
            760,
            252,
            812
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "4、四舍六入五取偶 ",
        "bbox": [
            146,
            816,
            305,
            831
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "Int ->float 同样 32 位不会发生溢出但是会失去精度",
        "bbox": [
            146,
            834,
            544,
            848
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "Int/float->double 不发生溢出，可以保留精度",
        "bbox": [
            146,
            853,
            509,
            868
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "Double->float float 数值更小会溢出；float 精度更小会舍入",
        "bbox": [
            146,
            872,
            615,
            887
        ],
        "page_idx": 26
    },
    {
        "type": "text",
        "text": "Float 、double->int 1、向 0 舍入 2、发生溢出",
        "bbox": [
            146,
            890,
            514,
            904
        ],
        "page_idx": 26
    },
    {
        "type": "image",
        "img_path": "images/bfa78e06b0d3913c28c391fec9983e9560c657cdba21f6186a404da3be4f5b19.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            709,
            719,
            741,
            740
        ],
        "page_idx": 26
    },
    {
        "type": "image",
        "img_path": "images/c18707fdc6690cbbeb12755c25664031e3864720f676bdd884409cae44b965d7.jpg",
        "image_caption": [
            "大端法与小端法"
        ],
        "image_footnote": [],
        "bbox": [
            147,
            108,
            932,
            394
        ],
        "page_idx": 27
    },
    {
        "type": "image",
        "img_path": "images/fc5f82e5e9be2a5c3b02fbe81cb70ad9ef2ad7623210873829e13a3b41d79e02.jpg",
        "image_caption": [
            "全加器"
        ],
        "image_footnote": [],
        "bbox": [
            147,
            423,
            934,
            740
        ],
        "page_idx": 27
    },
    {
        "type": "text",
        "text": "串行进位加法器（行波进位加法器）",
        "bbox": [
            147,
            778,
            423,
            795
        ],
        "page_idx": 27
    },
    {
        "type": "image",
        "img_path": "images/97427437348e9fdabf7e1f1dd98d4ee87c5cacd20c88a229ec6fe0060a545d10.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            166,
            112,
            710,
            225
        ],
        "page_idx": 28
    },
    {
        "type": "text",
        "text": "先行进位加法器",
        "bbox": [
            146,
            259,
            275,
            275
        ],
        "page_idx": 28
    },
    {
        "type": "text",
        "text": "乘法运算 ",
        "bbox": [
            147,
            278,
            221,
            294
        ],
        "page_idx": 28
    },
    {
        "type": "text",
        "text": "除法运算",
        "bbox": [
            147,
            296,
            221,
            313
        ],
        "page_idx": 28
    },
    {
        "type": "image",
        "img_path": "images/20dbaf06f5585bbdff9ba7e4458ceb025cb910d7536b1db144cebd7cca1b0b28.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            156,
            331,
            865,
            554
        ],
        "page_idx": 28
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 汉字输入：在西文标准键盘上，通过不同的字符组合，将汉字输入计算机，转换为汉字内码的过程",
            " 汉字输入码：也称外码，由不同的西文字符组合成的编码",
            " 汉字输入码种类："
        ],
        "bbox": [
            146,
            593,
            668,
            665
        ],
        "page_idx": 28
    },
    {
        "type": "text",
        "text": "数字编码：区位码、国标码、电报码等 ",
        "bbox": [
            146,
            684,
            453,
            702
        ],
        "page_idx": 28
    },
    {
        "type": "text",
        "text": "拼音编码：搜狗拼音、微软拼音等 ",
        "bbox": [
            146,
            722,
            416,
            739
        ],
        "page_idx": 28
    },
    {
        "type": "text",
        "text": "字形编码：五笔字型输入法、郑码",
        "bbox": [
            146,
            760,
            416,
            776
        ],
        "page_idx": 28
    },
    {
        "type": "text",
        "text": "音形编码：自然码、钱码",
        "bbox": [
            146,
            796,
            347,
            813
        ],
        "page_idx": 28
    },
    {
        "type": "text",
        "text": "汉字内码：用于汉字信息的存储、交换、检索等操作的机内代码",
        "bbox": [
            144,
            815,
            645,
            832
        ],
        "page_idx": 28
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 一般采用两个字节表示，汉字内码在计算机中是唯一的",
            " 汉字内码涉及以下几种编码：",
            " （1）区位码",
            " 汉字编码的国家标准：GB2312-1980《信息交换用汉字编码字符集·基本集》"
        ],
        "bbox": [
            146,
            834,
            747,
            906
        ],
        "page_idx": 28
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            " 共收录了 6763 个汉字、682 个图形符号",
            "• 一级常用汉字：3755 个，按拼音字母顺序排列",
            "• 二级次常用汉字：3008 个，按偏旁部首排列",
            " 两个字节编码汉字，每个字节各取 7 位，可编码 $1 2 8 \\times 1 2 8 = 1 6 3 8 4$ 个字符",
            " 将所有的汉字及符号组成一个 $9 4 \\times 9 4$ 的方阵，行 “区”，列 “位”",
            " 每个汉字与符号都位于某个区的某个位上，区号和位号 “区位码”",
            " 例如：“中”字位于 54 区 48 位 “中”字的区位码即为“5448  （2）国标码",
            " 国标码 $\\mid =$ 区位码 $+ 2 0 2 0 \\mathsf { H }$ ，占用两个字节",
            " 例如“中”字：区位码 $\\mathbf { = } 5 4 4 8$ ",
            "• 区码和位码转化为 16 进制， ${ \\bf = 3 6 3 0 H }$ ",
            "• 国标码 $\\lvert = 3 6 3 0 \\rvert + 2 0 2 0 \\ H = 5 6 5 0 \\ H$ ",
            " （3）汉字内码",
            " 西文字符：七位的 ASCII 码，当用一个字节表示时，最高位为“0”",
            " 汉字内码：汉字内码 $=$ 汉字国标码 $\\pm 8 0 8 0 \\mathsf { H }$ ，2 个字节的最高位均为“1”",
            "• 例如“中”字的机内码 $\\lvert = 5 6 5 0 \\rvert + 8 0 8 0 \\ H = \\mathrm { D } 6 \\mathrm { D } 0 \\mathsf { H }$ ",
            " 文本文件中储存的是汉字内码",
            "汉字处理系统中字形信息： $\\textcircled{1}$ 用活字或文字版的母体字形形式； $\\textcircled{2}$ 点阵表示法、",
            "矢量表示法等形式，最基本的，应用也最广泛的是字模码",
            " 字模码：用点阵形式表示与存储汉字字形代码，它是汉字的输出形式，用于汉字的显示和打印",
            " 根据汉字输出的要求不同，点阵的规模也不同：",
            "• 简易型汉字： $1 6 \\times 1 6$ ， 32 字节/汉字",
            "• 普及型汉字： $2 4 \\times 2 4$ ， 72 字节/汉字",
            "• 提高型汉字： $3 2 \\times 3 2$ ，128 字节/汉字",
            "• 精密型汉字： $4 8 \\times 4 8$ ，288 字节/汉字",
            " 汉字字库：将所有汉字的字模点阵代码按顺序集中存放，构成了汉字库",
            " 字形检索程序：将汉字的机内代码转化为汉字"
        ],
        "bbox": [
            146,
            93,
            794,
            590
        ],
        "page_idx": 29
    },
    {
        "type": "text",
        "text": "补码加减 ",
        "text_level": 1,
        "bbox": [
            146,
            612,
            221,
            627
        ],
        "page_idx": 29
    },
    {
        "type": "text",
        "text": "补码的加法运算公式：",
        "bbox": [
            176,
            634,
            359,
            650
        ],
        "page_idx": 29
    },
    {
        "type": "equation",
        "text": "$$\n= [ X + Y ] _ {\\text {补}} = [ X ] _ {\\text {补}} + [ Y ] _ {\\text {补}}\n$$",
        "text_format": "latex",
        "bbox": [
            196,
            653,
            359,
            670
        ],
        "page_idx": 29
    },
    {
        "type": "text",
        "text": "补码的减法运算公式：",
        "bbox": [
            436,
            633,
            618,
            648
        ],
        "page_idx": 29
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} - [ X - Y ] _ {\\text {补}} = [ X + (- Y) ] _ {\\text {补}} \\\\ = [ \\mathrm {X} ] _ {\\text {补}} + [ - \\mathrm {Y} ] _ {\\text {补}} \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            457,
            652,
            635,
            684
        ],
        "page_idx": 29
    },
    {
        "type": "text",
        "text": "证明：",
        "bbox": [
            188,
            676,
            228,
            689
        ],
        "page_idx": 29
    },
    {
        "type": "equation",
        "text": "$$\n[ X ] _ {\\text {补}} = 2 ^ {n + 1} + X \\quad (\\mathrm {m o d} 2 ^ {n + 1})\n$$",
        "text_format": "latex",
        "bbox": [
            194,
            690,
            421,
            706
        ],
        "page_idx": 29
    },
    {
        "type": "equation",
        "text": "$$\n[ Y ] _ {\\text {补}} = 2 ^ {n + 1} + Y \\quad (\\mathrm {m o d} 2 ^ {n + 1})\n$$",
        "text_format": "latex",
        "bbox": [
            194,
            711,
            421,
            726
        ],
        "page_idx": 29
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} [ X ] _ {\\text {补}} + [ Y ] _ {\\text {补}} = 2 ^ {n + 1} + X + 2 ^ {n + 1} + Y \\quad (\\mathrm {m o d} 2 ^ {n + 1}) \\\\ = 2 ^ {n + 1} + (X + Y) \\quad (\\text {m o d} 2 ^ {n + 1}) \\\\ = [ X + Y ] _ {\\text {补}} \\quad (\\mathrm {m o d} 2 ^ {n + 1}) \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            194,
            730,
            564,
            787
        ],
        "page_idx": 29
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "任意两数之和的补码 $=$ 两数的补码之和",
            "任意两数之差的补码 $=$ 被减数的补码与减数相反数的补码之和"
        ],
        "bbox": [
            166,
            799,
            608,
            829
        ],
        "page_idx": 29
    },
    {
        "type": "text",
        "text": "求补运算：[Y]补→[-Y]补 ",
        "text_level": 1,
        "bbox": [
            206,
            114,
            453,
            137
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "求补规则：将 $[ Y ] _ { \\ast \\mathrm { h } }$ 包括符号位在内每一位取反，末位加1。",
        "bbox": [
            157,
            148,
            665,
            167
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "若 $[ \\boldsymbol { \\Upsilon } _ { \\sharp \\flat } = \\boldsymbol { \\Upsilon } _ { \\mathsf { s } }$ $\\mathsf { Y } _ { 1 } . . . . . \\mathsf { Y } _ { \\mathsf { n } }$ ，则：",
        "bbox": [
            157,
            172,
            438,
            191
        ],
        "page_idx": 30
    },
    {
        "type": "equation",
        "text": "$$\n- [ - Y ] _ {\\text {补}} = \\overline {{Y _ {S}}} \\overline {{Y _ {1}}} \\dots \\dots \\overline {{Y _ {n}}} + 1\n$$",
        "text_format": "latex",
        "bbox": [
            181,
            196,
            428,
            216
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "若[Y]补 $\\mathbf { \\Psi } = \\mathsf { Y } _ { \\mathsf { S } } . \\mathsf { Y } _ { 1 } . . . . . \\mathsf { Y } _ { \\mathsf { n } }$ ，则：",
        "bbox": [
            157,
            221,
            430,
            239
        ],
        "page_idx": 30
    },
    {
        "type": "equation",
        "text": "$$\n- [ - Y ] _ {\\text {补}} = \\overline {{Y _ {S}}} \\overline {{Y _ {1}}} \\dots \\dots \\overline {{Y _ {n}}} + 0. 0 \\dots \\dots 0 1\n$$",
        "text_format": "latex",
        "bbox": [
            181,
            244,
            507,
            265
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "：溢出：运算结果超出机器数的表示范围",
        "bbox": [
            144,
            274,
            433,
            288
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "计算机硬件必须具备：",
        "bbox": [
            146,
            294,
            312,
            307
        ],
        "page_idx": 30
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·能够检测运算结果是否发生溢出；",
            "·能够指示运算结果是否发生溢出；"
        ],
        "bbox": [
            164,
            312,
            411,
            344
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "补码加减运算判溢方法：",
        "bbox": [
            519,
            278,
            705,
            292
        ],
        "page_idx": 30
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·单符号位判溢 ",
            "·进位判溢 ",
            "■双符号位判溢 "
        ],
        "bbox": [
            544,
            297,
            657,
            349
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "对于加减运算，可能发生溢出的情况：",
        "bbox": [
            144,
            350,
            421,
            365
        ],
        "page_idx": 30
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "■同号（两数）相加",
            "·异号（两数）相减 "
        ],
        "bbox": [
            164,
            369,
            310,
            401
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "Why? ",
        "bbox": [
            183,
            416,
            231,
            430
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "一定会发生溢出的情况：",
        "bbox": [
            337,
            382,
            521,
            397
        ],
        "page_idx": 30
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "正数相加，且运算结果符号位为1 ",
            "·负数相加，且运算结果符号位为0 ",
            "·正数－负数，且运算结果符号位为1 ",
            "■负数－正数，且运算结果符号位为0 "
        ],
        "bbox": [
            359,
            401,
            625,
            472
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "18 ",
        "text_level": 1,
        "bbox": [
            694,
            472,
            715,
            489
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "（1）单符号位判溢方法",
        "text_level": 1,
        "bbox": [
            211,
            505,
            400,
            521
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "$\\overline { { A D D } } / S U B = 0$ ：做加法",
        "bbox": [
            223,
            529,
            418,
            546
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "$\\overline { { A D D } } / S U B = 1$ ：做减法",
        "bbox": [
            225,
            552,
            418,
            568
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "【例4.3】的4种情况：",
        "bbox": [
            490,
            505,
            689,
            521
        ],
        "page_idx": 30
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} [ \\mathrm {X} ] _ {\\text {补}} = \\mathrm {X} _ {S} \\mathrm {X} _ {1} \\dots \\dots \\mathrm {X} _ {n} \\\\ [ \\mathrm {Y} ] _ {\\text {补}} = \\mathrm {Y} _ {S} \\mathrm {Y} _ {1} \\dots \\dots \\mathrm {Y} _ {n} \\\\ [ X \\pm Y ] _ {\\text {补}} = F _ {s} F _ {1} \\dots \\dots F _ {n} \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            468,
            526,
            667,
            575
        ],
        "page_idx": 30
    },
    {
        "type": "table",
        "img_path": "images/ea812e338c51b36ff98fc816caadb34d0e22ff55762a1c584f92915146ff3477.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>运算</td><td>操作数X</td><td>XS</td><td>操作数Y</td><td>YS</td><td>运算结果F</td><td>FS</td><td>溢出情况</td></tr><tr><td>X+Y</td><td>正数</td><td>0</td><td>正数</td><td>0</td><td>负数</td><td>1</td><td>正溢出</td></tr><tr><td>X+Y</td><td>负数</td><td>1</td><td>负数</td><td>1</td><td>正数</td><td>0</td><td>负溢出</td></tr><tr><td>X-Y</td><td>正数</td><td>0</td><td>负数</td><td>1</td><td>负数</td><td>1</td><td>正溢出</td></tr><tr><td>X-Y</td><td>负数</td><td>1</td><td>正数</td><td>0</td><td>正数</td><td>0</td><td>负溢出</td></tr></table>",
        "bbox": [
            179,
            583,
            872,
            730
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "$\\boldsymbol { \\mathsf { V } } = \\boldsymbol { \\mathsf { 1 } }$ ：溢出",
        "bbox": [
            179,
            740,
            277,
            757
        ],
        "page_idx": 30
    },
    {
        "type": "page_number",
        "text": "",
        "bbox": [
            828,
            741,
            838,
            750
        ],
        "page_idx": 30
    },
    {
        "type": "text",
        "text": "（3）双符号位判溢方法",
        "text_level": 1,
        "bbox": [
            166,
            90,
            352,
            108
        ],
        "page_idx": 31
    },
    {
        "type": "text",
        "text": "·X和Y采用双符号位补码参加运算，正数的双符号位为00，负数的双符号位为11；当运算结果的两位符号Fs1 $\\bar { \\mathsf { F } } _ { 5 2 }$ 不同时（01或10），发生溢出。",
        "bbox": [
            181,
            112,
            786,
            148
        ],
        "page_idx": 31
    },
    {
        "type": "equation",
        "text": "$$\n\\frac {\\mathrm {X} _ {\\mathrm {S}} \\mathrm {X} _ {\\mathrm {S}} \\mathrm {X} _ {1} \\mathrm {X} _ {2} \\dots \\dots \\mathrm {X} _ {\\mathrm {n}}}{\\mathrm {Y} _ {\\mathrm {S}} \\mathrm {Y} _ {\\mathrm {S}} \\mathrm {Y} _ {1} \\mathrm {Y} _ {2} \\dots \\dots \\mathrm {Y} _ {\\mathrm {n}}}\n$$",
        "text_format": "latex",
        "bbox": [
            231,
            158,
            415,
            212
        ],
        "page_idx": 31
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{r l} & \\mathrm {X} _ {\\mathrm {S}} \\mathrm {X} _ {1} \\mathrm {X} _ {2} \\dots \\dots \\mathrm {X} _ {\\mathrm {n}} \\\\ + & \\mathrm {Y} _ {\\mathrm {S}} \\mathrm {Y} _ {1} \\mathrm {Y} _ {2} \\dots \\dots \\mathrm {Y} _ {\\mathrm {n}} \\\\ \\hline & \\mathrm {F} _ {\\mathrm {S}} \\mathrm {F} _ {1} \\mathrm {F} _ {2} \\dots \\dots \\mathrm {F} _ {\\mathrm {n}} \\end{array} \\quad \\begin{array}{r l} & \\mathrm {F} _ {\\mathrm {S} 1} = \\mathrm {X} _ {\\mathrm {S}} \\oplus \\mathrm {Y} _ {\\mathrm {S}} \\oplus \\mathrm {C} _ {\\mathrm {S}} \\\\ & \\mathrm {F} _ {\\mathrm {S} 2} = \\mathrm {F} _ {\\mathrm {S}} \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            467,
            159,
            803,
            212
        ],
        "page_idx": 31
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{l} \\mathbf {V} = \\mathbf {F} _ {\\mathbf {S} 1} \\oplus \\mathbf {F} _ {\\mathbf {S} 2} \\\\ \\cdot \\mathbf {V} = \\mathbf {F} _ {\\mathbf {S} 1} \\oplus \\mathbf {F} _ {\\mathbf {S} 2} = \\mathbf {X} _ {\\mathbf {S}} \\oplus \\mathbf {Y} _ {\\mathbf {S}} \\oplus \\mathbf {C} _ {\\mathbf {S}} \\oplus \\mathbf {F} _ {\\mathbf {S}} \\\\ \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            253,
            231,
            709,
            250
        ],
        "page_idx": 31
    },
    {
        "type": "text",
        "text": "=Fs1 $\\bar { \\mathsf { F } } _ { S 2 } = 0 1$ ，则正溢出； $\\bar { \\mathsf { F } } _ { 5 1 } \\mathsf { F } _ { 5 2 } = 1 0$ ，则负溢出。 ",
        "bbox": [
            255,
            256,
            650,
            275
        ],
        "page_idx": 31
    },
    {
        "type": "text",
        "text": "核心部件：一个普通的二进制并行加法器。",
        "bbox": [
            144,
            329,
            389,
            342
        ],
        "page_idx": 31
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "A:累加器，存放[X]补 ",
            "B:寄存器，存放 $[ \\boldsymbol { \\mathsf { Y } } ] _ { \\sharp \\flat }$ "
        ],
        "bbox": [
            146,
            344,
            280,
            373
        ],
        "page_idx": 31
    },
    {
        "type": "text",
        "text": "取反电路：",
        "bbox": [
            147,
            376,
            208,
            388
        ],
        "page_idx": 31
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·控制信号P $\\cdot = 1$ ，取反电路工作；$\\mathsf { P } \\mathsf { = } \\mathsf { 0 }$ ：不工作 (不取反)",
            "· P= ADD/SUB "
        ],
        "bbox": [
            149,
            391,
            352,
            434
        ],
        "page_idx": 31
    },
    {
        "type": "image",
        "img_path": "images/ae54ce06282a8e6bd6869a6dae889b392853294a3eb61a65b62d54b612cdaac3.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            357,
            349,
            652,
            456
        ],
        "page_idx": 31
    },
    {
        "type": "text",
        "text": "工作原理：",
        "text_level": 1,
        "bbox": [
            146,
            453,
            206,
            464
        ],
        "page_idx": 31
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "- ADD/SUB ${ \\tt = } 0$ ：补码加法器，B寄存器→并行加法器 $[ \\mathsf { P } \\mathsf { \\tau } ] = \\mathsf { 0 } ]$ ",
            "·ADD/SUB=1:补码减法器，B取反→并行加法器（ $\\scriptstyle \\mathbf { P } = 1$ ），且并行加法器"
        ],
        "bbox": [
            149,
            468,
            603,
            495
        ],
        "page_idx": 31
    },
    {
        "type": "text",
        "text": "的最低位的进位-1 即R取反加1：相当干rY1..加r-V1.. →减法运算",
        "bbox": [
            164,
            498,
            568,
            506
        ],
        "page_idx": 31
    },
    {
        "type": "image",
        "img_path": "images/d9d5837f8365fb673cb70ee9ba3a74bd16f123df640119ed41a51adfb2ae366a.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            589,
            494,
            640,
            507
        ],
        "page_idx": 31
    },
    {
        "type": "text",
        "text": "乘法实现 ",
        "text_level": 1,
        "bbox": [
            147,
            519,
            221,
            533
        ],
        "page_idx": 31
    },
    {
        "type": "image",
        "img_path": "images/4e246a115c30e7de0c4f12d19cb99bf90bc9cd7e8afda36ca1d83dca0bfc5c41.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            201,
            557,
            643,
            768
        ],
        "page_idx": 31
    },
    {
        "type": "text",
        "text": "昇法少骤 ",
        "text_level": 1,
        "bbox": [
            154,
            89,
            228,
            98
        ],
        "page_idx": 32
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "X [X]原=Xs X, Xx....Xn ",
            "[Y]原=Ys Y, Y....Yn ",
            "： $\\mathbf { P } { = } \\mathbf { X } { \\cdot } \\mathbf { Y }$ ，Ps是积的符号"
        ],
        "bbox": [
            154,
            104,
            356,
            158
        ],
        "page_idx": 32
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\textcircled{1}$ 符号位单独处理 Ps=Xs Ys",
            "$\\textcircled{2}$ 绝对值进行数值运算|P|=|X|*|Y| ",
            "$\\textcircled{3}$ 初始部分积为0，从乘数最低位开始累加、右移： $\\yen 123$ ，部分积加|X|， $\\scriptstyle \\pmb { \\ Y } _ { \\mathbf { l } = \\mathbf { 0 } }$ 部分积加0，累加结果右移一位，得新部分积。",
            "$\\textcircled{4}$ 累加右移n次，即 $\\mathbf { \\beta } = \\mathbf { n }$ "
        ],
        "bbox": [
            154,
            162,
            739,
            253
        ],
        "page_idx": 32
    },
    {
        "type": "image",
        "img_path": "images/cae87f09a7a831e5a8b40bbdeee629097938a3a1a74a22e443e586a8ee6afeb5.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            149,
            291,
            181,
            303
        ],
        "page_idx": 32
    },
    {
        "type": "image",
        "img_path": "images/e9f01da7655ec11fc4a057bacb897b4b59ba6b38198840dcaf3782c713afc75c.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            174,
            303,
            534,
            501
        ],
        "page_idx": 32
    },
    {
        "type": "image",
        "img_path": "images/c9d69a7ab9cac99299f1038b5f374410d4c9dd5a62edfb63afd19f1e01341604.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            544,
            357,
            779,
            429
        ],
        "page_idx": 32
    },
    {
        "type": "text",
        "text": "控制逻辑电路",
        "text_level": 1,
        "bbox": [
            566,
            444,
            684,
            458
        ],
        "page_idx": 32
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\scriptstyle \\mathbf { Q } _ { n } = \\mathbf { 0 }$ : +0 (0...0&B) ",
            "$\\scriptstyle \\mathbf { Q } _ { n } = 1$ : +|X| (11...1&B) "
        ],
        "bbox": [
            584,
            464,
            757,
            494
        ],
        "page_idx": 32
    },
    {
        "type": "image",
        "img_path": "images/55167d2f731515103cb555f2a8a983360cf03536b770a98fecac758e276be506.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            749,
            502,
            779,
            521
        ],
        "page_idx": 32
    },
    {
        "type": "text",
        "text": "3、原码乘法的硬件实现 ",
        "text_level": 1,
        "bbox": [
            205,
            558,
            453,
            579
        ],
        "page_idx": 32
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "A:累加寄存器",
            "B:被乘数寄存器",
            "Q:乘数寄存器",
            "桶形移位器：F、Q联合逻辑右移"
        ],
        "bbox": [
            159,
            593,
            468,
            683
        ],
        "page_idx": 32
    },
    {
        "type": "text",
        "text": "A-{C，F.F1)Q-{Fn1) ",
        "bbox": [
            184,
            687,
            490,
            703
        ],
        "page_idx": 32
    },
    {
        "type": "image",
        "img_path": "images/50c123f3e8175837087fdfcd305333c9c9036c5008f2054a02668e8566c45fd6.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            515,
            558,
            800,
            713
        ],
        "page_idx": 32
    },
    {
        "type": "text",
        "text": "初始：",
        "text_level": 1,
        "bbox": [
            201,
            720,
            252,
            737
        ],
        "page_idx": 32
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "A=0 ",
            "B=|X| ",
            "Q=IYI ",
            "计数器=n "
        ],
        "bbox": [
            176,
            741,
            284,
            818
        ],
        "page_idx": 32
    },
    {
        "type": "text",
        "text": "累加、右移n次",
        "text_level": 1,
        "bbox": [
            312,
            747,
            452,
            766
        ],
        "page_idx": 32
    },
    {
        "type": "image",
        "img_path": "images/cee718a471c69c493caac3a6ae32770ed50a1dfbd57d645b620c0ef6a559157a.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            310,
            768,
            453,
            796
        ],
        "page_idx": 32
    },
    {
        "type": "text",
        "text": "结果：",
        "text_level": 1,
        "bbox": [
            539,
            720,
            589,
            737
        ],
        "page_idx": 32
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "A=乘积绝对值高位",
            "B =｜X) ",
            "$\\pmb { \\mathrm { Q } } =$ 乘积绝对值低位",
            "计数器 $\\mathtt { \\mathtt { = 0 } }$ "
        ],
        "bbox": [
            473,
            741,
            663,
            818
        ],
        "page_idx": 32
    },
    {
        "type": "image",
        "img_path": "images/35618de2ffe45452a153e0af96cb4963364157976dd9ea747ea1ac8ccbe444b9.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            752,
            804,
            784,
            827
        ],
        "page_idx": 32
    },
    {
        "type": "text",
        "text": "原码一位乘法流程：",
        "text_level": 1,
        "bbox": [
            169,
            92,
            384,
            112
        ],
        "page_idx": 33
    },
    {
        "type": "image",
        "img_path": "images/0c453e8e70a0be8534b121ac4c245278583c49001e1d8fb673fd9262cba1b395.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            152,
            128,
            584,
            368
        ],
        "page_idx": 33
    },
    {
        "type": "image",
        "img_path": "images/a36d031b37fdd38c2990cb53473d9ab5f781d7bc3d220d4963c8e5341bc4d63e.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            645,
            87,
            779,
            379
        ],
        "page_idx": 33
    },
    {
        "type": "text",
        "text": "除法",
        "text_level": 1,
        "bbox": [
            147,
            407,
            186,
            423
        ],
        "page_idx": 33
    },
    {
        "type": "text",
        "text": "X=+0.1011，Y=-0.1101，求X÷Y ",
        "bbox": [
            159,
            434,
            440,
            449
        ],
        "page_idx": 33
    },
    {
        "type": "text",
        "text": "手工除法：",
        "text_level": 1,
        "bbox": [
            159,
            454,
            252,
            468
        ],
        "page_idx": 33
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·判断被除数是否大于除数，决定商0/1。",
            "■若商1，则减除数（得部分余数），再添加一位数或者添加0",
            "·若商0，则直接添加一位数或者添加0 "
        ],
        "bbox": [
            183,
            470,
            557,
            518
        ],
        "page_idx": 33
    },
    {
        "type": "text",
        "text": "改进手工算法 适合机器运算：",
        "text_level": 1,
        "bbox": [
            159,
            530,
            400,
            544
        ],
        "page_idx": 33
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·计算机通过做减法测试来实现判断：结果大于等于0，表明够商1；结果小于0，表明不够减，商0。",
            "■计算机将部分余数左移一位，再直接与不右移的除数相减。"
        ],
        "bbox": [
            181,
            548,
            583,
            592
        ],
        "page_idx": 33
    },
    {
        "type": "text",
        "text": "即：减（+除数相反数的补码）",
        "text_level": 1,
        "bbox": [
            159,
            596,
            394,
            609
        ],
        "page_idx": 33
    },
    {
        "type": "text",
        "text": "左移，构成循环",
        "bbox": [
            206,
            615,
            324,
            630
        ],
        "page_idx": 33
    },
    {
        "type": "image",
        "img_path": "images/080881940dddf1c0a012c30525b5c825fe4016a68c3cf727c989870893f7a3b6.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            445,
            634,
            473,
            646
        ],
        "page_idx": 33
    },
    {
        "type": "image",
        "img_path": "images/bc67a26ef8c12a855344bd8b9a0214ec1762b77d8e934cbed0ba98eaad5f8e08.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            559,
            426,
            764,
            576
        ],
        "page_idx": 33
    },
    {
        "type": "image",
        "img_path": "images/f60008b096af71284ca25b36cf55312ff0d5181018ae1d26bb5b13719529cfef.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            144,
            89,
            794,
            357
        ],
        "page_idx": 34
    },
    {
        "type": "image",
        "img_path": "images/913d33a05eded314c13c28fbf1daa186986245ed66e8eb12b6d67956866f8a7e.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            221,
            419,
            719,
            561
        ],
        "page_idx": 34
    },
    {
        "type": "text",
        "text": "不恢复余数算法",
        "text_level": 1,
        "bbox": [
            147,
            630,
            275,
            645
        ],
        "page_idx": 34
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "又称为加减交替法：当不够减时，不恢复余数，用加上除数（+IYI）的办法来继续求下一位商，其他操作不变。",
            "加减交替法的规则如下："
        ],
        "bbox": [
            171,
            659,
            922,
            724
        ],
        "page_idx": 34
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "余数为正：商上1，求下一位商的办法，是余数左移一位，再减去除数；",
            "余数为负：商上0，求下一位商的办法，是余数左移一位，再加上除数。",
            "若最后一次上商为0，而又需得到正确余数，则最后一次仍需恢复余数。"
        ],
        "bbox": [
            200,
            728,
            880,
            800
        ],
        "page_idx": 34
    },
    {
        "type": "text",
        "text": "\"Why? ",
        "bbox": [
            176,
            808,
            270,
            829
        ],
        "page_idx": 34
    },
    {
        "type": "image",
        "img_path": "images/52d547c67d42a9203c76f16d5b457286133f23e717cfb269e410a277f0f94a48.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            191,
            93,
            675,
            304
        ],
        "page_idx": 35
    },
    {
        "type": "image",
        "img_path": "images/1635b02d62a20c8866fd2f847b7be51a7eb63e2baf3207aed8f554ea8f18d46a.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            149,
            360,
            537,
            596
        ],
        "page_idx": 35
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "： $\\textcircled{1}$ 如何控制加减交替？",
            "： $\\textcircled{2}$ 如何上商？",
            "$\\textcircled{3}$ 加减与移位次数如何控制，结果在哪里？",
            "$\\textcircled{1}$ 加减交替：控制逻辑"
        ],
        "bbox": [
            568,
            351,
            858,
            456
        ],
        "page_idx": 35
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\scriptstyle \\mathbf { Q } _ { \\mathrm { n } } = 1$ 表明够减一下一次做减法→B中的|Y|取反（11...11B)",
            "$\\scriptstyle \\mathbf { Q } _ { \\mathrm { n } } = \\mathbf { 0 }$ 表明不够减一下一次做加法→B中的|Y|不取反 (0...00B)"
        ],
        "bbox": [
            589,
            461,
            852,
            529
        ],
        "page_idx": 35
    },
    {
        "type": "text",
        "text": "$\\textcircled{2}$ 上商：Fs取反",
        "text_level": 1,
        "bbox": [
            549,
            535,
            705,
            551
        ],
        "page_idx": 35
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·Fs=0表明够减 $\\scriptstyle  \\mathbf { Q } _ { \\mathsf { n } } =$ ",
            "$\\bar { \\mathsf { F } } _ { \\mathsf { S } } \\mathsf { = }$ 1表明不够减 →Qn=0 "
        ],
        "bbox": [
            569,
            555,
            744,
            607
        ],
        "page_idx": 35
    },
    {
        "type": "image",
        "img_path": "images/3f2316993b77cc87c3b76fb52c1b9a866d3d27a79298726c073a1420897aecdd.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            739,
            543,
            873,
            615
        ],
        "page_idx": 35
    },
    {
        "type": "footer",
        "text": "定点运算器",
        "bbox": [
            147,
            667,
            240,
            683
        ],
        "page_idx": 35
    },
    {
        "type": "text",
        "text": "构成：",
        "text_level": 1,
        "bbox": [
            171,
            99,
            235,
            117
        ],
        "page_idx": 36
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "内部总线IB",
            "· ALU ",
            "·2个暂存器：LA和LB ",
            "·通用寄存器堆GPR：n+1个 "
        ],
        "bbox": [
            181,
            123,
            426,
            206
        ],
        "page_idx": 36
    },
    {
        "type": "image",
        "img_path": "images/e985aecc3e9eb9e76340b5366b6fa387f7ab170ac283a9cc5778b77f921838fd.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            416,
            102,
            875,
            227
        ],
        "page_idx": 36
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "· $\\mathrm { L A } _ { \\mathrm { i n } } = 1$ ：IB上数据写入LA ",
            "： $\\mathsf { L B } _ { \\mathrm { i n } } = 1$ :IB上数据写入LB",
            "ALUOP：功能码/运算码，选择ALU执行的运算",
            "$\\mathtt { A L U } _ { \\mathrm { o u t } } = \\mathbb { 1 }$ ：ALU的运算结果（即输出端F）→IB"
        ],
        "bbox": [
            168,
            229,
            447,
            353
        ],
        "page_idx": 36
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "RA：执行读操作的寄存器地址 ",
            "WA：执行写操作的寄存器地址 ",
            "$\\mathtt { G R } _ { \\mathtt { o u t } } = 1$ ：读出RA指定的寄存器数据送到IB上(Reg[RA]→IB)",
            "$\\mathsf { G R } _ { \\mathrm { i n } } = 1$ ：将IB上的数据写入由写地址WA选中的寄存器 (IB→Reg[WA])"
        ],
        "bbox": [
            468,
            230,
            860,
            355
        ],
        "page_idx": 36
    },
    {
        "type": "text",
        "text": "$\\gtrdot$ 数据通路：指数据在硬件系上流动的过程与控制步骤",
        "bbox": [
            146,
            420,
            420,
            454
        ],
        "page_idx": 36
    },
    {
        "type": "image",
        "img_path": "images/125f1f976a45bde61707512608d443be1397a84c51bebbeef84d0565bd4ae8b7.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            363,
            423,
            779,
            536
        ],
        "page_idx": 36
    },
    {
        "type": "text",
        "text": "在总线上传送数据的数据通路：需要一个CPU周期",
        "bbox": [
            144,
            544,
            542,
            558
        ],
        "page_idx": 36
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "源部件将数据送上总线；目的部件从总线上接收数据",
            "任何要把数据送上总线的源部件，其数据输出端必须以三态输出的形式与总线连接，并由使能信号控制",
            "·对于某个总线系统来说，各个总线源部件的数据输出使能信号不能同时有效：任何时刻只能允许一个部件将数据送上总线以保证分时高用总线"
        ],
        "bbox": [
            161,
            563,
            729,
            636
        ],
        "page_idx": 36
    },
    {
        "type": "image",
        "img_path": "images/8c546a5f5a7aab5fcbb5bf8368f8ffbbd6e20baab9c2b514f1bcfa342a332678.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            178,
            129,
            198,
            151
        ],
        "page_idx": 37
    },
    {
        "type": "text",
        "text": "【例4.10】假设在单总线运算器中，完成一条指令ADDR，R作 $\\mathbb { R } _ { 2 } + \\mathbb { R } _ { 7 }  \\mathbb { R } _ { 3 }$ ，则分析该操作的数据通路，需要几个CPU周期？",
        "bbox": [
            206,
            131,
            1000,
            186
        ],
        "page_idx": 37
    },
    {
        "type": "image",
        "img_path": "images/8195232877e38e022ce58354bf3e0f8e7017782e37ce393611d5c1f08bbd1c6a.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            181,
            193,
            805,
            361
        ],
        "page_idx": 37
    },
    {
        "type": "text",
        "text": "需要",
        "bbox": [
            907,
            286,
            996,
            309
        ],
        "page_idx": 37
    },
    {
        "type": "table",
        "img_path": "images/676656b11afbd4bb4ed24c75e2c3bbdba810d2f3ee73f6b7d4aa3f20b3344706.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>步骤</td><td>操作</td><td>发送的信号</td></tr><tr><td>1</td><td>R2→LA</td><td>RA=2, GRout=1, LAin=1</td></tr><tr><td>2</td><td>R7→LB</td><td>RA=7, GRout=1, LBin=1</td></tr><tr><td>3</td><td>ALU执行F=A+B运算，结果F→R3</td><td>ALU_OP=加法功能码，ALU_out=1,</td></tr></table>",
        "bbox": [
            149,
            363,
            1000,
            502
        ],
        "page_idx": 37
    },
    {
        "type": "image",
        "img_path": "images/d814906f52ca58133470d1ec963e40201e7792ebe345adbefb39a1651947d1be.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            514,
            186,
            545
        ],
        "page_idx": 37
    },
    {
        "type": "text",
        "text": "X 【例4.10】假设在单总线运算器中，完成一条指令ADD $\\pmb { \\mathsf { R } } _ { 3 }$ ${ \\sf R } _ { 2 }$ ，R的运算操$\\mathsf { E R } _ { 2 } + \\mathsf { R } _ { 7 } \\to \\mathsf { R } _ { 3 }$ ，则分析该操作的数据通路，需要几个CPU周期？",
        "bbox": [
            169,
            542,
            880,
            582
        ],
        "page_idx": 37
    },
    {
        "type": "image",
        "img_path": "images/a7fb5924317ec14cc0f9c5e3f8fb93545692880d72c48a901eeeba9aab0db9c9.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            171,
            587,
            613,
            705
        ],
        "page_idx": 37
    },
    {
        "type": "table",
        "img_path": "images/9b13f97b15ecbf42a4b3fbc38d6a0264d9e3f9b7d55a93c3776bd8f1ba8fc74f.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>步骤</td><td>操作</td><td>发送的信号</td></tr><tr><td>1</td><td>R2→LA</td><td>RA=2, GRout=1, LAin=1</td></tr><tr><td>2</td><td>R7→LB</td><td>RA=7, GRout=1, LBin=1</td></tr><tr><td>3</td><td>ALU执行F=A+B运算,结果F→R3</td><td>ALU_OP=加法功能码, ALU_out=1, GRin=1, WA=3</td></tr></table>",
        "bbox": [
            149,
            707,
            902,
            807
        ],
        "page_idx": 37
    },
    {
        "type": "text",
        "text": "需要3个CPU周期",
        "bbox": [
            685,
            651,
            868,
            670
        ],
        "page_idx": 37
    },
    {
        "type": "image",
        "img_path": "images/1ea251a75cc631e8da1edd057cec79441fb72193971d3eef097821a86412e2de.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            465,
            801,
            495,
            815
        ],
        "page_idx": 37
    },
    {
        "type": "header",
        "text": "（）车芯线给构",
        "bbox": [
            280,
            91,
            552,
            109
        ],
        "page_idx": 37
    },
    {
        "type": "text",
        "text": "构成：",
        "text_level": 1,
        "bbox": [
            168,
            99,
            226,
            115
        ],
        "page_idx": 38
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·2条内部总线：IB1、IB2 ",
            "· ALU ",
            "·暂存器：LC ",
            "·通用寄存器堆GPR：n+1个 "
        ],
        "bbox": [
            176,
            118,
            400,
            196
        ],
        "page_idx": 38
    },
    {
        "type": "image",
        "img_path": "images/a87051a1213d96b6ac50fd128c53e03bcfdec6caf2a3592e7cd20df2d14f35b1.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            458,
            92,
            791,
            212
        ],
        "page_idx": 38
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "： $\\iota C _ { \\mathrm { i n } } = 1$ ：ALU运算结果写入LC，即F→LC",
            "$\\dot { } \\cdot \\mathsf { L C } _ { \\mathsf { o u t } } = 1$ ：LC中数据送上总线IB1，即LC→IB1",
            "$\\ast$ ALU_OP:ALU功能码/运算码",
            "$\\ast$ RA1：执行读出数据到IB1的寄存器地址",
            "$\\ast$ RA2：执行读出数据到IB2的寄存器地址",
            "$^ \\ast$ WA：执行写操作的寄存器地址 "
        ],
        "bbox": [
            159,
            221,
            477,
            319
        ],
        "page_idx": 38
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\mathsf { G R } _ { \\mathsf { o u t 1 } } = 1$ ：读出RA1指定的寄存器数据送到IB1上，即Reg[RA1]→IB1",
            "$\\mathsf { G R } _ { \\mathsf { o u t } 2 } = 1$ ：读出RA2指定的寄存器数据送到IB2上，即Reg[RA2]→IB2",
            "$\\mathsf { G R } _ { \\mathrm { i n } } = 1$ ：将IB1上的数据写入由写地址WA中的寄存器，即IB1→Reg[WA]"
        ],
        "bbox": [
            489,
            222,
            789,
            313
        ],
        "page_idx": 38
    },
    {
        "type": "image",
        "img_path": "images/75625929eabda9a925a66bd9baf77befd3d36f41294bd86703c1f96680c42d1e.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            336,
            200,
            382
        ],
        "page_idx": 38
    },
    {
        "type": "text",
        "text": "（2）双总线结构",
        "text_level": 1,
        "bbox": [
            255,
            338,
            455,
            363
        ],
        "page_idx": 38
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "【例4.11】假设在双总线运算器中，同样完成指令ADD ${ \\sf R } _ { 3 }$ $\\mathsf { R } _ { 2 }$ $\\mathsf { R } _ { 7 }$ 的运算操作 $R _ { 2 } + R _ { 7 }  R _ { 3 }$ ，分析数据通路，需要几个CPU周期？",
            "需要2个CPU周期"
        ],
        "bbox": [
            179,
            379,
            519,
            505
        ],
        "page_idx": 38
    },
    {
        "type": "image",
        "img_path": "images/2f5b4666b8610e3c937ac6d9db58dffad8bf5997aa2c849c2a86b02e3a84305b.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            531,
            370,
            954,
            514
        ],
        "page_idx": 38
    },
    {
        "type": "table",
        "img_path": "images/27e6b4c904af645b814918bd9000a1238d85a03c91d2ebcc857a47d91d031796.jpg",
        "table_caption": [],
        "table_footnote": [],
        "table_body": "<table><tr><td>步骤</td><td>操作</td><td>发送的信号</td></tr><tr><td>1</td><td>R2→IB1, R7→IB2, F=A+B, F→LC</td><td>RA1=2, RA2=7, ALU_OP=加法功能码,GRout1=1, GRout2=1, LCin=1</td></tr><tr><td>2</td><td>LC→R3</td><td>LCout=1, GRin=1, WA=3</td></tr></table>",
        "bbox": [
            166,
            519,
            939,
            608
        ],
        "page_idx": 38
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "思考：如果LC暂存器输出端连接到IB2上，能否完成上述操作？",
            "总结：在分析总线结构的运算器数据通路时，基本的原则：在一个CPU周期内，某条总线上的数据必须是唯一的，且不能保留至下一个CPU周期。"
        ],
        "bbox": [
            173,
            609,
            910,
            663
        ],
        "page_idx": 38
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "特征：按照运算操作的过程与控制需求，部件之间由专用的独立线路进行连接",
            "特点：线路比较复杂，但是传输效率高，适用于流水线CPU"
        ],
        "bbox": [
            161,
            99,
            952,
            147
        ],
        "page_idx": 39
    },
    {
        "type": "image",
        "img_path": "images/a7e3272769accbdabd6a76fd92b15f114f238570452f7eb9ae49f9f25ff03f10.jpg",
        "image_caption": [
            "单周期CPU的运算器",
            "每条指令只需一个CPU周期完成"
        ],
        "image_footnote": [],
        "bbox": [
            169,
            193,
            463,
            344
        ],
        "page_idx": 39
    },
    {
        "type": "image",
        "img_path": "images/dd24d6faebf55dcbf9ad5485c350bf3bc364b5b8f7b499d47a4200f6e1f95dd1.jpg",
        "image_caption": [
            "多周期CPU的运算器",
            "每条指令需要多个CPU周期完成"
        ],
        "image_footnote": [],
        "bbox": [
            566,
            197,
            969,
            347
        ],
        "page_idx": 39
    },
    {
        "type": "image",
        "img_path": "images/314d6cadb0bfe6466e978c155fecfc534eaf9f467fd04c79c80fc0bce91e1af4.jpg",
        "image_caption": [
            "单周期CPU的运算器"
        ],
        "image_footnote": [],
        "bbox": [
            149,
            425,
            366,
            536
        ],
        "page_idx": 39
    },
    {
        "type": "text",
        "text": "·只需1个clk周期：",
        "bbox": [
            147,
            546,
            284,
            562
        ],
        "page_idx": 39
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "RAA=2,RBA=7,WA=3 ",
            "·ALU_OP=加法功能码",
            "·Reg_W=1，在clk的边沿完成R2+R→R3操作"
        ],
        "bbox": [
            152,
            565,
            359,
            626
        ],
        "page_idx": 39
    },
    {
        "type": "image",
        "img_path": "images/2a77f41d31aa31d653f723077162ad45fbdb4b02309f3ee781bfbda011629076.jpg",
        "image_caption": [
            "执行ADD R3, "
        ],
        "image_footnote": [],
        "bbox": [
            403,
            426,
            764,
            537
        ],
        "page_idx": 39
    },
    {
        "type": "text",
        "text": "需3个节拍（clk周期）：",
        "bbox": [
            408,
            539,
            601,
            555
        ],
        "page_idx": 39
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·第1个clk（读寄存器）： $\\mathsf { R } _ { 2 } { \\longrightarrow } \\mathsf { A }$ $\\scriptstyle \\mathsf { R } _ { 7 } \\to \\mathsf { B }$ :RAA $^ { 1 = 2 }$ RB A=7",
            "·第2个clk（执行）：A+B→F:ALU_OP=加法功能码",
            "·第3个clk（写回）： $\\mathsf { F } {  } \\mathsf { R } _ { 3 }$ :WA $^ { = 3 }$ ，Reg_W=1"
        ],
        "bbox": [
            421,
            558,
            768,
            619
        ],
        "page_idx": 39
    },
    {
        "type": "image",
        "img_path": "images/59c466468b213ccd281befcd1eebfaec5971995dd519d811b30d31d64f190ad7.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            727,
            620,
            757,
            633
        ],
        "page_idx": 39
    },
    {
        "type": "text",
        "text": "特征：能够对一组寄存器同时读出或者写入多个数据 ",
        "text_level": 1,
        "bbox": [
            166,
            99,
            759,
            122
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "三端口寄存器堆可以同时进行",
        "text_level": 1,
        "bbox": [
            168,
            134,
            346,
            175
        ],
        "page_idx": 40
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·读A端口",
            "读B端口",
            "·写入数据 "
        ],
        "bbox": [
            200,
            181,
            309,
            249
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "寄存器堆：4×8位",
        "text_level": 1,
        "bbox": [
            146,
            259,
            342,
            278
        ],
        "page_idx": 40
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\mathbb { R } _ { 0 } \\sim \\mathbb { R } _ { 3 } ,$ ，地址2位",
            "·RA_A:A口地址 ",
            "·RA_D:A口读出数据 ",
            "RB_A:B口地址",
            "RB_D:B口读出数据"
        ],
        "bbox": [
            176,
            282,
            366,
            382
        ],
        "page_idx": 40
    },
    {
        "type": "image",
        "img_path": "images/7f04dad3f2cd8523941ddb3b2e5073b147d88189f7b4c6de8b40c926dd617f13.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            383,
            124,
            957,
            388
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "标志寄存器FR：又称为状态寄存器",
        "text_level": 1,
        "bbox": [
            151,
            493,
            485,
            511
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "PSW:程序状态字",
        "text_level": 1,
        "bbox": [
            586,
            492,
            759,
            510
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "■用来保存ALU操作结果的某些状态，可作为外界对运算结果进行分析的依据，也可以用于判断程序是否要转移的条件",
        "bbox": [
            179,
            514,
            847,
            552
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "最基本的5种运算结果标志：",
        "text_level": 1,
        "bbox": [
            151,
            557,
            418,
            574
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "$\\textcircled{1}$ ZF：结果为零标志",
        "bbox": [
            179,
            577,
            371,
            596
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "·运算结果为全0，ZF置1 ",
        "bbox": [
            210,
            601,
            438,
            619
        ],
        "page_idx": 40
    },
    {
        "type": "equation",
        "text": "$$\nZ F = \\overline {{F _ {n} + F _ {n - 1} + . . . . . . + F _ {0}}}\n$$",
        "text_format": "latex",
        "bbox": [
            502,
            599,
            788,
            621
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "·运算结果不全为0，ZF置0 ",
        "bbox": [
            210,
            623,
            465,
            640
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "$\\textcircled{2}$ CF：进位/借位标志位，CF标志只对无符号数运算有意义 ",
        "bbox": [
            179,
            645,
            705,
            662
        ],
        "page_idx": 40
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·加法运算时：C=1则CF置1（表示有进位），否则置0",
            "·减法运算时： $\\subset = \\pmb { 0 }$ 则CF置1（表示不够减，有借位），否则置0"
        ],
        "bbox": [
            210,
            667,
            781,
            707
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "最高位的进位",
        "bbox": [
            240,
            715,
            295,
            744
        ],
        "page_idx": 40
    },
    {
        "type": "equation",
        "text": "$$\nC F = \\overline {{\\overline {{A D D}} / S U B}} \\cdot C + \\overline {{A D D}} / S U B \\cdot \\overline {{C}}\n$$",
        "text_format": "latex",
        "bbox": [
            403,
            717,
            789,
            746
        ],
        "page_idx": 40
    },
    {
        "type": "image",
        "img_path": "images/131355cd6254e9395745464151013638000f1f37cc5df5cc5192d7004b5949af.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            848,
            744,
            887,
            759
        ],
        "page_idx": 40
    },
    {
        "type": "text",
        "text": "③UF：溢出标志，反映有符亏数加减运算所得结果是否溢出；UF标志只对带",
        "bbox": [
            213,
            87,
            902,
            104
        ],
        "page_idx": 41
    },
    {
        "type": "text",
        "text": "符号数运算有意义。 ",
        "bbox": [
            233,
            105,
            410,
            123
        ],
        "page_idx": 41
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·运算溢出：OF=1 ",
            "·运算没有溢出：OF $\\mathtt { \\mathtt { \\mathtt { = 0 } } }$ "
        ],
        "bbox": [
            245,
            127,
            463,
            166
        ],
        "page_idx": 41
    },
    {
        "type": "equation",
        "text": "$$\n\\begin{array}{c c} O F = \\overline {{A D D / S U B}} \\left(\\overline {{X _ {S}}} \\overline {{Y _ {S}}} F _ {S} + X _ {S} Y _ {S} \\overline {{F _ {S}}}\\right) \\\\ + \\overline {{A D D}} / S U B \\left(\\overline {{X _ {S}}} Y _ {S} F _ {S} + X _ {S} \\overline {{Y _ {S}}} \\overline {{F _ {S}}}\\right) \\\\ \\hline O F = C _ {1} \\oplus C _ {S} & O F = F _ {S 1} \\oplus F _ {S 2} \\end{array}\n$$",
        "text_format": "latex",
        "bbox": [
            527,
            112,
            882,
            187
        ],
        "page_idx": 41
    },
    {
        "type": "text",
        "text": "$\\textcircled{4}$ SF：符号标志，记录运算结果的符号。",
        "bbox": [
            213,
            196,
            576,
            215
        ],
        "page_idx": 41
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·为运算结果的最高位 SF =Fn ",
            "·运算结果为正数时： $\\pmb { S F = 0 }$ ；为负数时： $s F { = } 1$ 。 (无溢出时才正确)"
        ],
        "bbox": [
            245,
            219,
            860,
            263
        ],
        "page_idx": 41
    },
    {
        "type": "text",
        "text": "$\\textcircled{5}$ PF：奇偶标志，反映运算结果中“1”的个数的奇偶性",
        "bbox": [
            213,
            268,
            724,
            287
        ],
        "page_idx": 41
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·结果中“1”的个数为偶数：PF=1 ",
            "·结果中“1”的个数为奇数：PF=0 "
        ],
        "bbox": [
            245,
            291,
            573,
            331
        ],
        "page_idx": 41
    },
    {
        "type": "equation",
        "text": "$$\nP F = \\overline {{F _ {n} \\oplus F _ {n - 1} \\oplus \\dots . \\oplus F _ {0}}}\n$$",
        "text_format": "latex",
        "bbox": [
            593,
            297,
            922,
            326
        ],
        "page_idx": 41
    },
    {
        "type": "text",
        "text": "假设两个浮点数X和Y ",
        "text_level": 1,
        "bbox": [
            171,
            435,
            472,
            458
        ],
        "page_idx": 41
    },
    {
        "type": "equation",
        "text": "$$\nX = M _ {X} \\times 2 ^ {E _ {X}}\n$$",
        "text_format": "latex",
        "bbox": [
            376,
            474,
            588,
            506
        ],
        "page_idx": 41
    },
    {
        "type": "equation",
        "text": "$$\nY = M _ {Y} \\times 2 ^ {E _ {Y}}\n$$",
        "text_format": "latex",
        "bbox": [
            695,
            473,
            902,
            506
        ],
        "page_idx": 41
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "对齐小数点：使得阶码小的那个数变得与阶码大的那个数的阶码",
            "然后：对尾数（有效数位）做加减运算"
        ],
        "bbox": [
            171,
            539,
            996,
            606
        ],
        "page_idx": 41
    },
    {
        "type": "equation",
        "text": "$$\nZ = X \\pm Y = \\left(M _ {X} \\cdot 2 ^ {\\left(E _ {X} - E _ {Y}\\right)} \\pm M _ {Y}\\right) \\times 2 ^ {E _ {Y}} \\quad E _ {X} \\leq\n$$",
        "text_format": "latex",
        "bbox": [
            262,
            627,
            998,
            661
        ],
        "page_idx": 41
    },
    {
        "type": "page_number",
        "text": "74 ",
        "bbox": [
            887,
            338,
            927,
            357
        ],
        "page_idx": 41
    },
    {
        "type": "text",
        "text": "(2）对阶：",
        "bbox": [
            154,
            93,
            238,
            110
        ],
        "page_idx": 42
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "目标是：对齐小数点",
            "原则是：小阶对大阶"
        ],
        "bbox": [
            147,
            117,
            363,
            164
        ],
        "page_idx": 42
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "求阶差△E=Ex-Eγ，若△E≠0，即Ex≠E时需要对阶。",
            "若△E>0，则Ex>Eγ，M每右移一位， $\\mathbb { E } _ { \\mathsf { Y } ^ { + } }$ 1，直至 $\\mathsf { E } _ { \\mathsf { v } } = \\mathsf { E } _ { \\mathsf { X } }$ ",
            "若△E<0，则 $\\mathsf { E } _ { \\mathsf { X } } { < } \\mathsf { E } _ { \\mathsf { Y } }$ $\\pmb { M } _ { \\mathbf { X } }$ 每右移一位， $\\mathtt { E _ { X } } + 1$ ，直至 $\\therefore x = E _ { y }$ "
        ],
        "bbox": [
            169,
            167,
            653,
            224
        ],
        "page_idx": 42
    },
    {
        "type": "text",
        "text": "(3）尾数相加减 ",
        "bbox": [
            154,
            227,
            287,
            243
        ],
        "page_idx": 42
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·若做减法，先将操作数Y的尾数取相反数，再与Y的尾数相加 ",
            "■对阶时，右移多出的数位不丢弃（因为一般设置位数更宽的ALU进行计算，同时设置更宽的寄存器来存放中间运算结果)"
        ],
        "bbox": [
            169,
            247,
            779,
            300
        ],
        "page_idx": 42
    },
    {
        "type": "text",
        "text": "82 ",
        "bbox": [
            774,
            303,
            808,
            317
        ],
        "page_idx": 42
    },
    {
        "type": "text",
        "text": "浮点加减运算步骤 ",
        "text_level": 1,
        "bbox": [
            196,
            347,
            445,
            366
        ],
        "page_idx": 42
    },
    {
        "type": "text",
        "text": "【4）结果规格化：尾数运算的结果可能出现两种非规格化情况：",
        "bbox": [
            144,
            382,
            773,
            401
        ],
        "page_idx": 42
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·尾数溢出：需要右规（1次），即尾数右移1位，阶码+1",
            "尾数| $< 2 ^ { - 1 }$ ：需要左规，即尾数左移1位，阶码-1，左规可能多次，直到尾数变为规格化形式。",
            "·先判断是否溢出，如果没有，再判断是否有前导零"
        ],
        "bbox": [
            147,
            407,
            927,
            524
        ],
        "page_idx": 42
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "[5）舍入：将尾数多余的位数舍去，变成规定的浮点数格式",
            "舍入策略：舍去多余位数的方法，简单的舍入策略："
        ],
        "bbox": [
            144,
            555,
            742,
            600
        ],
        "page_idx": 42
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·截断法：多余的全舍去 ",
            "·0舍1入法：多余位的最高位为1时，在尾数最低位上+1，否则舍去多余位",
            "·末位恒置1：始终在舍入结果的最末位置1"
        ],
        "bbox": [
            196,
            604,
            833,
            662
        ],
        "page_idx": 42
    },
    {
        "type": "text",
        "text": "IEEE754标准：规定了4种可选的舍入模式",
        "text_level": 1,
        "bbox": [
            169,
            104,
            544,
            120
        ],
        "page_idx": 43
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$\\textcircled{1}$ 向上舍入（总是朝+）：为正数时，只要多余位不全为0，就向最低有效位进1；为负数时，则采用简单的截断法",
            "$\\textcircled{2}$ 向下舍入（总是朝－）：为正数时，只要多余位不全为0，就简单地截尾为负数时，则向最低有效位进1",
            "$\\textcircled{3}$ 向0舍入：即朝数轴的原点方向舍入，就是无论正数还是负数，都采用简单的截尾，从而使得绝对值总是变小。这种方法容易累积误差",
            "$\\textcircled{4}$ 就近舍入：即舍入到最接近的数，“四舍五入”。多余位=R,...Rn"
        ],
        "bbox": [
            186,
            124,
            737,
            239
        ],
        "page_idx": 43
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "·当R $\\scriptstyle 1 = 0$ ：截尾（即舍去）；",
            "·当R $_ 1 = 1$ ,且R...R不全为0：向最低有效位进1；",
            "· $\\yen 123,456,7$ ：即等于一半（中点），则若最低有效位为0就截尾，若最低有效位为1就进1，以使得最低有效位总是为0"
        ],
        "bbox": [
            213,
            241,
            734,
            294
        ],
        "page_idx": 43
    },
    {
        "type": "text",
        "text": "中间结果设置了：保护位(guard)、舍入位(round)、粘滞位(sticky)",
        "bbox": [
            171,
            298,
            680,
            313
        ],
        "page_idx": 43
    },
    {
        "type": "image",
        "img_path": "images/55a92cad7bcb03d99177cc82bcc618a4c22ad6fac867143503578508456fb4c6.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            173,
            361,
            647,
            600
        ],
        "page_idx": 43
    },
    {
        "type": "image",
        "img_path": "images/7749aefff1f44fe5f12bbb0be1645640461baee14490e7fc1b26359b4e945f52.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            700,
            577,
            734,
            598
        ],
        "page_idx": 43
    },
    {
        "type": "image",
        "img_path": "images/5f43ed1e5bce18a593cd23ba0865b39f93ba309eb7af27bdb85047d14e10b90e.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            147,
            89,
            191,
            126
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "浮点加减运算例题 ",
        "text_level": 1,
        "bbox": [
            228,
            87,
            443,
            107
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "(2）尾数相加：",
        "text_level": 1,
        "bbox": [
            196,
            120,
            347,
            140
        ],
        "page_idx": 44
    },
    {
        "type": "equation",
        "text": "$$\n\\left[ \\mathrm {M} _ {2} \\right] _ {\\text {补}} = 1. 1 0 0 0 0 0 1 (1 0 1)\n$$",
        "text_format": "latex",
        "bbox": [
            243,
            146,
            497,
            166
        ],
        "page_idx": 44
    },
    {
        "type": "equation",
        "text": "$$\n[ \\mathrm {M} _ {\\mathrm {X}} ] _ {\\text {补}} 1 1. 0 1 1 0 1 0 1\n$$",
        "text_format": "latex",
        "bbox": [
            643,
            123,
            823,
            141
        ],
        "page_idx": 44
    },
    {
        "type": "equation",
        "text": "$$\n+ \\left[ \\mathbf {M} _ {\\mathbf {Y}} \\right] _ {\\text {补}} 0 0. 0 0 0 1 1 0 0 (1 0 1)\n$$",
        "text_format": "latex",
        "bbox": [
            615,
            145,
            868,
            164
        ],
        "page_idx": 44
    },
    {
        "type": "equation",
        "text": "$$\n\\left[ \\mathbf {M} _ {\\mathrm {X}} + \\mathbf {M} _ {\\mathrm {Y}} \\right] _ {\\text {补}} 1 1. 1 0 0 0 0 0 1 (1 0 1)\n$$",
        "text_format": "latex",
        "bbox": [
            605,
            168,
            868,
            187
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "（3）结果规格化：首先判断：是否溢出？",
        "bbox": [
            200,
            196,
            606,
            215
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "因为双符号位为11，没有溢出",
        "bbox": [
            421,
            216,
            660,
            231
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "再检查：有无前导零？",
        "bbox": [
            393,
            233,
            603,
            250
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "因为 $\\boldsymbol { \\mathsf { M } } _ { \\mathrm { Z } } \\boldsymbol { \\mathrm { l } } _ { * \\mathrm { f } }$ 符号位和最高有效位相同 $= 1 . 1$ 故有一个前导零，须左规一位",
        "bbox": [
            421,
            252,
            746,
            284
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "左规一位：尾数左移1位，阶码-1",
        "bbox": [
            393,
            286,
            702,
            303
        ],
        "page_idx": 44
    },
    {
        "type": "list",
        "sub_type": "text",
        "list_items": [
            "$[ \\mathbf { M } _ { 2 } ] _ { * \\mathrm { h } } = 1 . 0 0 0 0 0 1 1$ (01) ",
            "$[ \\ E _ { \\mathrm { Z } } ] _ { * \\mathrm { h } } = 0 0$ ，001 + 11, $1 1 1 = 0 0$ ，000"
        ],
        "bbox": [
            421,
            306,
            744,
            338
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "(4）舍入：按照0舍1入法，尾数多余位舍去 ",
        "text_level": 1,
        "bbox": [
            200,
            342,
            645,
            363
        ],
        "page_idx": 44
    },
    {
        "type": "text",
        "text": "结果为： $[ \\mathsf { X } + \\mathsf { Y } ] _ { \\dag \\Xi } = 0$ ，000 1.0000011 ",
        "bbox": [
            220,
            367,
            584,
            384
        ],
        "page_idx": 44
    },
    {
        "type": "image",
        "img_path": "images/cd1e8e31644d4311c85ff19418a4b8474f57ffd8021141b8b4cc57db704dfb8a.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            779,
            366,
            811,
            384
        ],
        "page_idx": 44
    },
    {
        "type": "image",
        "img_path": "images/3696e23690406c549b23470efcee5693b5f60e0db09eef2133e90f7a62811e0a.jpg",
        "image_caption": [],
        "image_footnote": [],
        "bbox": [
            852,
            366,
            870,
            384
        ],
        "page_idx": 44
    }
]