From d79a4b8ee6c6ab4e2f6bdffee0cc2f63024f5c9a Mon Sep 17 00:00:00 2001 From: ridethepig Date: Fri, 21 Apr 2023 00:28:18 +0800 Subject: [PATCH] COD Chapter 1 --- ...rganization_and_Design_1681729306797_0.edn | 922 +++++++++++++++++- ...Organization_and_Design_1681729306797_0.md | 312 +++++- 2 files changed, 1206 insertions(+), 28 deletions(-) diff --git a/assets/Computer_Organization_and_Design_1681729306797_0.edn b/assets/Computer_Organization_and_Design_1681729306797_0.edn index 4f9453c..5b051eb 100644 --- a/assets/Computer_Organization_and_Design_1681729306797_0.edn +++ b/assets/Computer_Organization_and_Design_1681729306797_0.edn @@ -917,5 +917,923 @@ :height 1065.5991999999999}), :page 72}, :content {:text "ensnared "}, - :properties {:color "green"}}], - :extra {:page 72}} + :properties {:color "green"}} + {:id #uuid "6441170f-b51b-453a-b612-0b71b2b6032d", + :page 72, + :position {:bounding {:x1 666.24658203125, + :y1 732.15625, + :x2 741.0265502929688, + :y2 752.15625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 666.24658203125, + :y1 732.15625, + :x2 741.0265502929688, + :y2 752.15625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 72}, + :content {:text "corollary"}, + :properties {:color "green"}} + {:id #uuid "64411718-be78-469d-9b83-0dfd9c83338b", + :page 72, + :position {:bounding {:x1 558.261962890625, + :y1 732.15625, + :x2 666.2598266601562, + :y2 752.15625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 558.261962890625, + :y1 732.15625, + :x2 666.2598266601562, + :y2 752.15625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 72}, + :content {:text "demoralizing "}, + :properties {:color "green"}} + {:id #uuid "64411720-4c6a-49ce-8a72-4aa19e7b8482", + :page 72, + :position {:bounding {:x1 164.79791259765625, + :y1 754.546875, + :x2 220.84051513671875, + :y2 774.546875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 164.79791259765625, + :y1 754.546875, + :x2 220.84051513671875, + :y2 774.546875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 72}, + :content {:text " plague"}, + :properties {:color "green"}} + {:id #uuid "6441179d-ae59-49b4-8903-874cb5b7c9cd", + :page 72, + :position {:bounding {:x1 416.296875, + :y1 911.34375, + :x2 530.962646484375, + :y2 931.34375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 416.296875, + :y1 911.34375, + :x2 530.962646484375, + :y2 931.34375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 72}, + :content {:text "Amdahl’s Law"}, + :properties {:color "yellow"}} + {:id #uuid "6441212c-596a-463c-a47a-04478b16268b", + :page 73, + :position {:bounding {:x1 330.93280029296875, + :y1 555.578125, + :x2 649.2786865234375, + :y2 574.578125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 330.93280029296875, + :y1 555.578125, + :x2 649.2786865234375, + :y2 574.578125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 73}, + :content {:text "Computers at low utilization use little power."}, + :properties {:color "yellow"}} + {:id #uuid "64412369-dd7a-4a26-9979-be7179f38df6", + :page 74, + :position {:bounding {:x1 301.421875, + :y1 240.859375, + :x2 599.467041015625, + :y2 259.859375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 301.421875, + :y1 240.859375, + :x2 599.467041015625, + :y2 259.859375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 74}, + :content {:text "MIPS (million instructions per second)"}, + :properties {:color "yellow"}} + {:id #uuid "64412821-6b54-47a0-9317-a4b042989fdf", + :page 83, + :position {:bounding {:x1 0, + :y1 124, + :x2 728.5886840820312, + :y2 807.890625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 124, + :x2 0, + :y2 148, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 0, + :y1 140, + :x2 0, + :y2 164, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 403.265625, + :y1 641.984375, + :x2 657.0306396484375, + :y2 696.984375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 403.265625, + :y1 697.4375, + :x2 728.5886840820312, + :y2 752.4375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 403.265625, + :y1 704.4375, + :x2 728.5886840820312, + :y2 746.03125, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 403.265625, + :y1 752.890625, + :x2 597.96435546875, + :y2 807.890625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 83}, + :content {:text "Instructions: Language of the Computer"}, + :properties {:color "yellow"}} + {:id #uuid "64412a38-84ed-4f97-b83d-911772eb7158", + :page 86, + :position {:bounding {:x1 93.59375, + :y1 490.46875, + :x2 158.8719024658203, + :y2 509.46875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 93.59375, + :y1 490.46875, + :x2 158.8719024658203, + :y2 509.46875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 86}, + :content {:text "palatable"}, + :properties {:color "green"}} + {:id #uuid "64412bbd-513c-4e00-8576-7ef88749e552", + :page 86, + :position {:bounding {:x1 581.6553955078125, + :y1 428.0625, + :x2 652.463623046875, + :y2 447.0625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 581.6553955078125, + :y1 428.0625, + :x2 652.463623046875, + :y2 447.0625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 86}, + :content {:text "rationale "}, + :properties {:color "green"}} + {:id #uuid "64412ca1-c9b5-4d6b-ba19-d353992dd2f1", + :page 86, + :position {:bounding {:x1 199.328125, + :y1 587.8125, + :x2 641.960693359375, + :y2 619.8125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 199.328125, + :y1 587.8125, + :x2 641.960693359375, + :y2 619.8125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 86}, + :content {:text "Operations of the Computer Hardware"}, + :properties {:color "yellow"}} + {:id #uuid "64412cc0-59a8-4a38-9094-1a7bd916a41f", + :page 89, + :position {:bounding {:x1 353.59375, + :y1 882.46875, + :x2 778.74755859375, + :y2 914.46875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 353.59375, + :y1 882.46875, + :x2 778.74755859375, + :y2 914.46875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 89}, + :content {:text "Operands of the Computer Hardware"}, + :properties {:color "yellow"}} + {:id #uuid "64412fc0-7ad1-4c8a-9c03-c198e741605b", + :page 91, + :position {:bounding {:x1 639.25, + :y1 561.546875, + :x2 838.1859130859375, + :y2 580.546875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 639.25, + :y1 561.546875, + :x2 838.1859130859375, + :y2 580.546875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 91}, + :content {:text "data transfer instructions"}, + :properties {:color "yellow"}} + {:id #uuid "6441425c-134d-449d-ae39-4db48a67054c", + :page 92, + :position {:bounding {:x1 186.765625, + :y1 986.609375, + :x2 351.5075378417969, + :y2 1005.609375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 186.765625, + :y1 986.609375, + :x2 351.5075378417969, + :y2 1005.609375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 92}, + :content {:text "alignment restriction"}, + :properties {:color "yellow"}} + {:id #uuid "64414940-7d06-4339-af0b-974b1b34dbc5", + :page 93, + :position {:bounding {:x1 0, + :y1 28, + :x2 842.7676391601562, + :y2 523.3125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 28, + :x2 0, + :y2 52, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 788.0542602539062, + :y1 483.515625, + :x2 842.7676391601562, + :y2 502.515625, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 504.3125, + :x2 414.9499816894531, + :y2 523.3125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 93}, + :content {:text " MIPS is in the big-endian camp. "}, + :properties {:color "yellow"}} + {:id #uuid "64414a51-2d38-48ff-b0c0-bc53f9c5fadb", + :page 95, + :position {:bounding {:x1 247.859375, + :y1 134.015625, + :x2 577.7615356445312, + :y2 161.015625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 247.859375, + :y1 134.015625, + :x2 577.7615356445312, + :y2 161.015625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 95}, + :content {:text "Constant or Immediate Operands"}, + :properties {:color "yellow"}} + {:id #uuid "64414af2-05ea-4a88-baf6-a19462b4c3a9", + :page 95, + :position {:bounding {:x1 0, + :y1 284, + :x2 842.5028076171875, + :y2 617.953125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 284, + :x2 0, + :y2 308, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 0, + :y1 300, + :x2 0, + :y2 324, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 268.65625, + :y1 557.359375, + :x2 336.2773132324219, + :y2 576.359375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 347.0625, + :y1 557.359375, + :x2 468.8554382324219, + :y2 576.359375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 479.640625, + :y1 557.359375, + :x2 597.2772827148438, + :y2 576.359375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 608.0625, + :y1 557.359375, + :x2 707.7147827148438, + :y2 576.359375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 718.5, + :y1 557.359375, + :x2 842.5028076171875, + :y2 576.359375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 578.15625, + :x2 842.1734008789062, + :y2 597.15625, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 598.953125, + :x2 517.081298828125, + :y2 617.953125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 95}, + :content {:text "Constant operands occur frequently, and by including constants inside arithmetic instructions, operations are much faster and use less energy than if constants were loaded from memory."}, + :properties {:color "yellow"}} + {:id #uuid "64414b4e-cf31-4e7f-8320-2f1bbcbf9b32", + :page 96, + :position {:bounding {:x1 0, + :y1 156, + :x2 688.129638671875, + :y2 410.859375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 156, + :x2 0, + :y2 180, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 201.921875, + :y1 370.796875, + :x2 688.129638671875, + :y2 391.796875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 93.59375, + :y1 389.859375, + :x2 226.82322692871094, + :y2 410.859375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 96}, + :content {:text "Since MIPS supports negative constants, there is no need for subtract immediate in MIPS."}, + :properties {:color "yellow"}} + {:id #uuid "64414b5f-de73-4bbc-812d-8ebd0f082ea0", + :page 96, + :position {:bounding {:x1 162.12307739257812, + :y1 458.59375, + :x2 554.4741821289062, + :y2 499.59375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 162.12307739257812, + :y1 458.59375, + :x2 162.1279296875, + :y2 499.59375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 199.328125, + :y1 465.140625, + :x2 554.4741821289062, + :y2 497.140625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 96}, + :content {:text "Signed and Unsigned Numbers"}, + :properties {:color "yellow"}} + {:id #uuid "64414bb1-c764-493b-b555-4e241a31f255", + :page 96, + :position {:bounding {:x1 297.890625, + :y1 669.390625, + :x2 394.86053466796875, + :y2 688.390625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 297.890625, + :y1 669.390625, + :x2 394.86053466796875, + :y2 688.390625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 96}, + :content {:text "binary digits "}, + :properties {:color "yellow"}} + {:id #uuid "64414c34-4dc9-4127-9938-faf0374b6c29", + :page 97, + :position {:bounding {:x1 0, + :y1 492, + :x2 842.3908081054688, + :y2 988.28125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 492, + :x2 0, + :y2 516, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 430.45306396484375, + :y1 948.46875, + :x2 842.3908081054688, + :y2 967.46875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 969.28125, + :x2 314.7354736328125, + :y2 988.28125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 97}, + :content {:text "inary bit patterns above are simply representatives of numbers. "}, + :properties {:color "yellow"}} + {:id #uuid "64414d2f-3ea8-45a6-9a7a-b84f74a554cf", + :page 103, + :position {:bounding {:x1 316.3887023925781, + :y1 165.890625, + :x2 828.2520141601562, + :y2 206.890625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 316.3887023925781, + :y1 165.890625, + :x2 316.3935546875, + :y2 206.890625, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 353.59375, + :y1 172.4375, + :x2 828.2520141601562, + :y2 204.4375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 103}, + :content {:text "Representing Instructions in the Computer"}, + :properties {:color "yellow"}} + {:id #uuid "64414d4d-71a4-44df-9475-d710bfee40d3", + :page 98, + :position {:bounding {:x1 373.484375, + :y1 240.859375, + :x2 513.6807250976562, + :y2 259.859375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 373.484375, + :y1 240.859375, + :x2 513.6807250976562, + :y2 259.859375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 98}, + :content {:text "sign and magnitude"}, + :properties {:color "yellow"}} + {:id #uuid "64414e6e-e6f7-4d05-865f-a18455c509ba", + :page 99, + :position {:bounding {:x1 727.3969116210938, + :y1 968.546875, + :x2 756.0888061523438, + :y2 987.546875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 727.3969116210938, + :y1 968.546875, + :x2 756.0888061523438, + :y2 987.546875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 99}, + :content {:text "moot"}, + :properties {:color "green"}} + {:id #uuid "64414fbb-4773-4332-bf21-f533847d0bde", + :page 99, + :position {:bounding {:x1 0, + :y1 316, + :x2 842.350341796875, + :y2 925.140625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 316, + :x2 0, + :y2 340, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 814.171875, + :y1 885.34375, + :x2 842.350341796875, + :y2 904.34375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.8125, + :y1 906.140625, + :x2 314.9574890136719, + :y2 925.140625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 99}, + :content {:text "sign extension"}, + :properties {:color "yellow"}} + {:id #uuid "64415085-a9e5-4193-a5d1-9c90f5d63ea8", + :page 101, + :position {:bounding {:x1 0, + :y1 444, + :x2 842.400146484375, + :y2 1068.03125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 444, + :x2 0, + :y2 468, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 0, + :y1 460, + :x2 0, + :y2 484, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 0, + :y1 476, + :x2 0, + :y2 500, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 986.609375, + :x2 842.400146484375, + :y2 1005.609375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 1007.421875, + :x2 842.3902587890625, + :y2 1026.421875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 1028.21875, + :x2 842.3952026367188, + :y2 1047.21875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 1049.03125, + :x2 767.5921630859375, + :y2 1068.03125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 101}, + :content {:text "This trick works because positive two’s complement numbers really have an infinite number of 0s on the left and negative two’s complement numbers have an infinite number of 1s. The binary bit pattern representing a number hides leading bits to fit the width of the hardware; sign extension simply restores some of them."}, + :properties {:color "yellow"}} + {:id #uuid "64415118-595d-4125-b641-333d82a58006", + :page 110, + :position {:bounding {:x1 199.328125, + :y1 463.25, + :x2 417.72845458984375, + :y2 495.25, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 199.328125, + :y1 463.25, + :x2 417.72845458984375, + :y2 495.25, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 110}, + :content {:text "Logical Operations"}, + :properties {:color "yellow"}} + {:id #uuid "64415179-3df0-431e-9e53-8608796931dd", + :page 105, + :position {:bounding {:x1 247.859375, + :y1 495.25, + :x2 366.1187744140625, + :y2 522.25, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 247.859375, + :y1 495.25, + :x2 366.1187744140625, + :y2 522.25, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 105}, + :content {:text "MIPS Fields"}, + :properties {:color "yellow"}} + {:id #uuid "64415292-0727-4366-8717-ecca11267baf", + :page 106, + :position {:bounding {:x1 114.390625, + :y1 136.84375, + :x2 571.34375, + :y2 155.84375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 114.390625, + :y1 136.84375, + :x2 571.34375, + :y2 155.84375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 106}, + :content {:text "Design Principle 3: Good design demands good compromises."}, + :properties {:color "yellow"}} + {:id #uuid "644152aa-00c2-4542-abaf-7048e6d37904", + :page 90, + :position {:bounding {:x1 114.390625, + :y1 331, + :x2 380.34375, + :y2 350, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 114.390625, + :y1 331, + :x2 380.34375, + :y2 350, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 90}, + :content {:text "Design Principle 2: Smaller is faster."}, + :properties {:color "yellow"}} + {:id #uuid "644152b5-ee31-4da9-86e4-33d7472f04c3", + :page 88, + :position {:bounding {:x1 114.390625, + :y1 310.203125, + :x2 454.88836669921875, + :y2 329.203125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 114.390625, + :y1 310.203125, + :x2 454.88836669921875, + :y2 329.203125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 88}, + :content {:text "Design Principle 1: Simplicity favors regularity."}, + :properties {:color "yellow"}} + {:id #uuid "644154b4-a07e-46fd-aa88-178297b61434", + :page 113, + :position {:bounding {:x1 353.59375, + :y1 172.4375, + :x2 747.692138671875, + :y2 204.4375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 353.59375, + :y1 172.4375, + :x2 747.692138671875, + :y2 204.4375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 113}, + :content {:text "Instructions for Making Decisions"}, + :properties {:color "yellow"}} + {:id #uuid "644156a7-b2b5-4010-97e3-a432f077cd33", + :page 113, + :position {:bounding {:x1 537.546875, + :y1 553.484375, + :x2 697.383056640625, + :y2 572.484375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 537.546875, + :y1 553.484375, + :x2 697.383056640625, + :y2 572.484375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 113}, + :content {:text "conditional branches"}, + :properties {:color "yellow"}} + {:id #uuid "644156f5-e485-4140-be11-6ef87a585383", + :page 119, + :position {:bounding {:x1 0, + :y1 364, + :x2 772.2033081054688, + :y2 890.21875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 364, + :x2 0, + :y2 388, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 353.59375, + :y1 827, + :x2 772.2033081054688, + :y2 859, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 353.59375, + :y1 858.21875, + :x2 463.2795104980469, + :y2 890.21875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 119}, + :content {:text "Supporting Procedures in Computer Hardware"}, + :properties {:color "yellow"}} + {:id #uuid "64415778-92af-4d30-b3b4-0b3dddd397f4", + :page 115, + :position {:bounding {:x1 247.859375, + :y1 294.1875, + :x2 307.3605651855469, + :y2 321.1875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 247.859375, + :y1 294.1875, + :x2 307.3605651855469, + :y2 321.1875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 115}, + :content {:text "Loops"}, + :properties {:color "yellow"}} + {:id #uuid "6441591a-02ed-4556-8fd7-5fdb310063e7", + :page 117, + :position {:bounding {:x1 607.9564819335938, + :y1 292.859375, + :x2 691.715087890625, + :y2 311.859375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 607.9564819335938, + :y1 292.859375, + :x2 691.715087890625, + :y2 311.859375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 117}, + :content {:text "dichotomy "}, + :properties {:color "green"}} + {:id #uuid "644159a7-3b96-4924-8260-0cb300307c86", + :page 118, + :position {:bounding {:x1 93.59375, + :y1 551.15625, + :x2 335.29815673828125, + :y2 578.15625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 93.59375, + :y1 551.15625, + :x2 335.29815673828125, + :y2 578.15625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 118}, + :content {:text "Case/Switch Statement"}, + :properties {:color "yellow"}} + {:id #uuid "64416330-597c-4245-8d53-a5dc643ea05f", + :page 121, + :position {:bounding {:x1 369.87750244140625, + :y1 504.59375, + :x2 412.9659118652344, + :y2 523.59375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 369.87750244140625, + :y1 504.59375, + :x2 412.9659118652344, + :y2 523.59375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 121}, + :content {:text "spill "}, + :properties {:color "green"}} + {:id #uuid "64416615-2966-4adb-a524-845337e588d3", + :page 125, + :position {:bounding {:x1 247.859375, + :y1 984.671875, + :x2 733.875, + :y2 1003.671875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 247.859375, + :y1 984.671875, + :x2 330.5800476074219, + :y2 1003.671875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 342.703125, + :y1 984.671875, + :x2 733.875, + :y2 1003.671875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 328.84375, + :y1 987.671875, + :x2 330.5800476074219, + :y2 1001.53125, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 342.703125, + :y1 987.671875, + :x2 733.875, + :y2 1001.53125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 125}, + :content {:text "FIGURE 2.11 What is and what is not preserved across a procedure call. "}, + :properties {:color "yellow"}} + {:id #uuid "64416671-9318-4296-9588-c0421c02cdd2", + :page 127, + :position {:bounding {:x1 666.8914794921875, + :y1 396.171875, + :x2 771.6559448242188, + :y2 415.171875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 666.8914794921875, + :y1 396.171875, + :x2 771.6559448242188, + :y2 415.171875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 127}, + :content {:text " wax and wane."}, + :properties {:color "green"}} + {:id #uuid "6441667f-2639-458b-91fd-8bf6b5a2c6ae", + :page 126, + :position {:bounding {:x1 93.59375, + :y1 221.375, + :x2 532.6923217773438, + :y2 248.375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 93.59375, + :y1 221.375, + :x2 532.6923217773438, + :y2 248.375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 126}, + :content {:text "Allocating Space for New Data on the Stack"}, + :properties {:color "yellow"}} + {:id #uuid "64416688-3f6e-444e-b265-3e4a36ec51b8", + :page 126, + :position {:bounding {:x1 153.53125, + :y1 317.125, + :x2 436.0551452636719, + :y2 336.125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 153.53125, + :y1 317.125, + :x2 436.0551452636719, + :y2 336.125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 126}, + :content {:text "procedure frame or activation record"}, + :properties {:color "yellow"}} + {:id #uuid "644167c0-1ac2-42df-b01d-4fff03a393e7", + :page 129, + :position {:bounding {:x1 353.59375, + :y1 492.546875, + :x2 679.142333984375, + :y2 524.546875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 353.59375, + :y1 492.546875, + :x2 679.142333984375, + :y2 524.546875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 129}, + :content {:text "Communicating with People"}, + :properties {:color "yellow"}}], + :extra {:page 129}} diff --git a/pages/hls__Computer_Organization_and_Design_1681729306797_0.md b/pages/hls__Computer_Organization_and_Design_1681729306797_0.md index c6cdaba..b09a343 100644 --- a/pages/hls__Computer_Organization_and_Design_1681729306797_0.md +++ b/pages/hls__Computer_Organization_and_Design_1681729306797_0.md @@ -6,51 +6,52 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. hl-page:: 25 hl-color:: yellow id:: 643d2848-6edf-4c05-92c7-4a7de1b9cd22 -- omnipresent - ls-type:: annotation +- omnipresent 无所不在的 ubiquitous hl-page:: 27 - hl-color:: green + ls-type:: annotation id:: 643e2b82-f5a5-411e-9571-d494858c175a + hl-color:: green - Classes of Computing Applications and Their Characteristics ls-type:: annotation hl-page:: 28 hl-color:: yellow id:: 643e2b9c-0bc2-4b02-b2b1-33e25539d5b9 -- credo +- credo 信条,教义 ls-type:: annotation hl-page:: 30 hl-color:: green id:: 643e473a-2f03-419b-ad3a-8309c33dff15 -- unraveling - ls-type:: annotation +- unraveling 解开;阐明; hl-page:: 31 - hl-color:: green + ls-type:: annotation id:: 643e47b3-cc6c-4fd1-83a9-0510b16a5e9c -- acronyms + hl-color:: green +- acronyms 首字母缩略词 ls-type:: annotation hl-page:: 32 hl-color:: green id:: 643e485f-8de8-41bf-86ac-812ba202f4c8 -- leverages - ls-type:: annotation +- leverage 影响力;杠杆作用 hl-page:: 33 - hl-color:: green + ls-type:: annotation id:: 643e4871-3ebb-4578-9227-b40a534adeac -- intrinsic + hl-color:: green +- intrinsic 固有的, 内在的, 本质的 ls-type:: annotation hl-page:: 33 hl-color:: green id:: 643e4882-a5ea-4bff-9b5f-17f585313142 -- weave - ls-type:: annotation +- weave 编织;杜撰 hl-page:: 34 - hl-color:: green + ls-type:: annotation id:: 643e492d-5e63-4b9b-93f7-4f44bf50158e + hl-color:: green - Below Your Program ls-type:: annotation hl-page:: 36 hl-color:: yellow id:: 643ea1cf-af0e-45ba-97b3-376fd21ee1e3 + collapsed:: true - From a High-Level Language to the Language of Hardware ls-type:: annotation hl-page:: 37 @@ -61,6 +62,7 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. hl-page:: 39 hl-color:: yellow id:: 643ea295-e170-403a-a43d-71777bb41d9b + collapsed:: true - The five classic components of a computer are input, output, memory, datapath, and control ls-type:: annotation hl-page:: 40 @@ -83,7 +85,7 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. id:: 643eb029-9fe9-4013-a4a2-1365e195333b hl-color:: yellow - interface between the hardware and low-level software, distinguish architecture from implementation -- rod +- rod 杆;竿;棒 ls-type:: annotation hl-page:: 41 hl-color:: green @@ -93,12 +95,12 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. ls-type:: annotation id:: 643ea93a-fa50-486a-b74a-d96f2a4df9aa hl-color:: green -- raster +- raster 光栅 ls-type:: annotation hl-page:: 41 hl-color:: green id:: 643ea8f8-7e5f-42e3-a04a-01cd91f25d13 -- brawn +- brawn 体力;发达的肌肉 ls-type:: annotation hl-page:: 42 hl-color:: green @@ -108,6 +110,7 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. hl-page:: 47 hl-color:: yellow id:: 643eb311-6b10-4fa3-9aa3-dfd5a59acf2c + collapsed:: true - Semiconductor, silicon: add materials to silicon that allow tiny areas to transform into one of three devices: Excellent conductor, Excellent insulator and Transistor (conduct/insulate at some conditions) hl-page:: 48 ls-type:: annotation @@ -116,16 +119,17 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. - Silicon ingot sliced into Blank wafers, processed into Patterned wafers, and then Tested wafer, diced into Tested dies, bonded to package, finally Tested packaged dies - die: Rectangular sections cut from a wafer (actually chip) - yield: Percentage of good dies from the total dies on the wafer -- quadrupled - ls-type:: annotation +- quadruple 四倍的;四重的; hl-page:: 48 - hl-color:: green + ls-type:: annotation id:: 643eb37e-2927-4100-b8b3-c76bbe5450f4 + hl-color:: green - Performance ls-type:: annotation hl-page:: 51 hl-color:: yellow id:: 643ec3be-027e-48b5-90e0-cd4a5e901691 + collapsed:: true - response/execution time: time between the start and completion of a task hl-page:: 52 ls-type:: annotation @@ -190,6 +194,7 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. hl-page:: 63 hl-color:: yellow id:: 6440df39-4ac7-4efc-b59a-64db6354ca0f + collapsed:: true - dynamic energy: The energy consumed when transistors switch states, primary source of energy consumption for CMOS. - The energy of a single transition: $\text{Energy} \propto \frac12 \times \text{Capacitive load} \times \text{Voltage}^2$ - The power required per transistor: $\text{Power} \propto \frac12 \times \text{Capacitive load} \times \text{Voltage}^2 \times \text{Frequency switched}$ @@ -197,12 +202,12 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. - Capacitive load is a function of *fanout* (number of transistors connected to an output) and the technology (capacitance of wires and transistors). - Main way to reduce power is to lower the *voltage*. - There is problem with low voltage: this makes the capacitor leakage increase. (static energy) -- slam - ls-type:: annotation +- slam 砰地关上(门或窗);抨击 hl-page:: 65 - hl-color:: green + ls-type:: annotation id:: 6440e306-7625-4883-b3f0-fbdca42d92e3 -- faucet + hl-color:: green +- faucet 水龙头 ls-type:: annotation hl-page:: 65 hl-color:: green @@ -233,11 +238,46 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. hl-page:: 72 hl-color:: yellow id:: 6440ea56-fdd5-426f-9a76-d5b5a7465c55 + collapsed:: true + - Amdahl's Law: $\text{Execution time after improvement} = \frac{\text{Execution time affected by improvement} }{\text{Amount of improvement}} + \text{Execution time unaffected}$ + hl-page:: 72 + ls-type:: annotation + id:: 6441179d-ae59-49b4-8903-874cb5b7c9cd + hl-color:: yellow + - Thus, we CANNOT expect ==improvement of one aspect== of a computer to ==increase overall performance by an amount proportional== to the size of improvement. + - Computers at low utilization don't necessarily use little power, or in other words, power consumption is not proportional to the system's load. + hl-page:: 73 + ls-type:: annotation + id:: 6441212c-596a-463c-a47a-04478b16268b + hl-color:: yellow + - MIPS (million instructions per second) = $\frac{\text{Instruction count}}{\text{Execution time} \times 10^6} = \frac{\text{Clock rate}}{\text{CPI} \times 10^6}$ + hl-page:: 74 + ls-type:: annotation + id:: 64412369-dd7a-4a26-9979-be7179f38df6 + hl-color:: yellow + - Problem 1: it doesn't take into account the *Instruction count*, or the capability of each instruction. We should not compare computers with different ISAs. + - Problem 2: MIPS varies between programs even on the same computer. + - Problem 3: MIPS can vary independently from performance. - ensnared ls-type:: annotation hl-page:: 72 hl-color:: green id:: 6440ec21-aef2-4494-8b50-d16a83c0d9bb +- corollary + ls-type:: annotation + hl-page:: 72 + hl-color:: green + id:: 6441170f-b51b-453a-b612-0b71b2b6032d +- demoralize + ls-type:: annotation + hl-page:: 72 + hl-color:: green + id:: 64411718-be78-469d-9b83-0dfd9c83338b +- plague + ls-type:: annotation + hl-page:: 72 + hl-color:: green + id:: 64411720-4c6a-49ce-8a72-4aa19e7b8482 - preclude ls-type:: annotation hl-page:: 75 @@ -252,4 +292,224 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. ls-type:: annotation hl-page:: 75 hl-color:: green - id:: 6440ebd7-8c0c-4a18-9d86-bd95714f58ac \ No newline at end of file + id:: 6440ebd7-8c0c-4a18-9d86-bd95714f58ac +- # Instructions: Language of the Computer + ls-type:: annotation + hl-page:: 83 + hl-color:: yellow + id:: 64412821-6b54-47a0-9317-a4b042989fdf +- palatable + ls-type:: annotation + hl-page:: 86 + hl-color:: green + id:: 64412a38-84ed-4f97-b83d-911772eb7158 +- rationale + ls-type:: annotation + hl-page:: 86 + hl-color:: green + id:: 64412bbd-513c-4e00-8576-7ef88749e552 +- Operations of the Computer Hardware + ls-type:: annotation + hl-page:: 86 + hl-color:: yellow + id:: 64412ca1-c9b5-4d6b-ba19-d353992dd2f1 + - Three-operand arithmetic instructions +- Operands of the Computer Hardware + ls-type:: annotation + hl-page:: 89 + hl-color:: yellow + id:: 64412cc0-59a8-4a38-9094-1a7bd916a41f + - Registers, where operands of arithmetic instructions must reside + - Register size is a *word* (32 bit) + - 32 registers in MIPS. + - fewer registers to keep clock cycles fast (though 31 regs may not be faster then 32 regs) + - instruction format (5-bit field for register number) + - data transfer instructions + ls-type:: annotation + hl-page:: 91 + hl-color:: yellow + id:: 64412fc0-7ad1-4c8a-9c03-c198e741605b + - memory to register or inverse + - alignment restriction: Words must start at addresses that are multiples of 4 + hl-page:: 92 + ls-type:: annotation + id:: 6441425c-134d-449d-ae39-4db48a67054c + hl-color:: yellow + - memory is addressed by byte + - MIPS is in the big-endian camp (though the textbook says so, the latest MIPS32 by default is little endian) + hl-page:: 93 + ls-type:: annotation + id:: 64414940-7d06-4339-af0b-974b1b34dbc5 + hl-color:: yellow + - Constant or Immediate Operands + ls-type:: annotation + hl-page:: 95 + hl-color:: yellow + id:: 64414a51-2d38-48ff-b0c0-bc53f9c5fadb + - Constant operands occur frequently, and by ==including constants inside arithmetic instructions==, operations are much ==faster== and use ==less energy== than if constants were ==loaded from memory==. + hl-page:: 95 + ls-type:: annotation + id:: 64414af2-05ea-4a88-baf6-a19462b4c3a9 + hl-color:: yellow + - Since MIPS supports ==negative constants==, there is no need for subtract immediate in MIPS. + ls-type:: annotation + hl-page:: 96 + hl-color:: yellow + id:: 64414b4e-cf31-4e7f-8320-2f1bbcbf9b32 +- Signed and Unsigned Numbers + ls-type:: annotation + hl-page:: 96 + hl-color:: yellow + id:: 64414b5f-de73-4bbc-812d-8ebd0f082ea0 + - binary digits + hl-page:: 96 + ls-type:: annotation + id:: 64414bb1-c764-493b-b555-4e241a31f255 + hl-color:: yellow + - value of `i`th digit: $d \times \text{Base}^i$ + - LSB and MSB + - Numbers have infinite number of digits, binary bit patterns are simply representatives of numbers. Thus, there are various ways of handling *overflow*. + hl-page:: 97 + ls-type:: annotation + id:: 64414c34-4dc9-4127-9938-faf0374b6c29 + hl-color:: yellow + - Signed numbers + - **sign and magnitude**: add a separate sign bit. Problems with this approach, need an extra step to set the sign during calculation, negative and positive zero + hl-page:: 98 + ls-type:: annotation + id:: 64414d4d-71a4-44df-9475-d710bfee40d3 + hl-color:: yellow + - **two's compliment** + - the value of this form can be written as $(d_{31} \cdot -2^{31}) + d_{30} \cdot 2^{30} + \dots$, note the first $-2^{31}$ + - **one's compliment**: negate operation is to simply invert each bit + - sign extension: copy the sign repeatedly to fill the rest of the register when loading from memory + hl-page:: 99 + ls-type:: annotation + id:: 64414fbb-4773-4332-bf21-f533847d0bde + hl-color:: yellow + - This trick works because positive 2's complement numbers really have an infinite number of 0s on the left and negative 2's complement numbers have an infinite number of 1s. The binary bit pattern representing a number hides leading bits to fit the width of the hardware; sign extension simply restores some of them. + hl-page:: 101 + ls-type:: annotation + id:: 64415085-a9e5-4193-a5d1-9c90f5d63ea8 + hl-color:: yellow +- moot + ls-type:: annotation + hl-page:: 99 + hl-color:: green + id:: 64414e6e-e6f7-4d05-865f-a18455c509ba +- Representing Instructions in the Computer + ls-type:: annotation + hl-page:: 103 + hl-color:: yellow + id:: 64414d2f-3ea8-45a6-9a7a-b84f74a554cf + - MIPS Fields + ls-type:: annotation + hl-page:: 105 + hl-color:: yellow + id:: 64415179-3df0-431e-9e53-8608796931dd + - In order to keep the instructions regular (aligned by word), MIPS has irregular layouts for different types of instruct. + - R-type: `op | rs | rt | rd | shamt | funct` + - I-type: `op | rs | rt | constant/address` + - The 16-bit address means a `lw` can only load from a region of $\pm 2^{15}$ bytes of the base register. + - here `rt` serves as the destination register +- Design Principles + - Design Principle 1: Simplicity favors regularity. + ls-type:: annotation + hl-page:: 88 + hl-color:: yellow + id:: 644152b5-ee31-4da9-86e4-33d7472f04c3 + - Design Principle 2: Smaller is faster. + ls-type:: annotation + hl-page:: 90 + hl-color:: yellow + id:: 644152aa-00c2-4542-abaf-7048e6d37904 + - Design Principle 3: Good design demands good compromises. + ls-type:: annotation + hl-page:: 106 + hl-color:: yellow + id:: 64415292-0727-4366-8717-ecca11267baf +- Logical Operations + ls-type:: annotation + hl-page:: 110 + hl-color:: yellow + id:: 64415118-595d-4125-b641-333d82a58006 + - `sll` and `srl`, use the `shamt` (shift amount) field + - `andi` `ori` extend their 16-bit constant field by filling 0s + - there is no exact instruction for bitwise not, but a `nor` (not or, `a NOR b = NOT(a OR b)`) instruction (perhaps in order to keep the 3-operand format) +- Instructions for Making Decisions + ls-type:: annotation + hl-page:: 113 + hl-color:: yellow + id:: 644154b4-a07e-46fd-aa88-178297b61434 + - conditional branches: `bne` and `beq` + hl-page:: 113 + ls-type:: annotation + id:: 644156a7-b2b5-4010-97e3-a432f077cd33 + hl-color:: yellow + - Loops + ls-type:: annotation + hl-page:: 115 + hl-color:: yellow + id:: 64415778-92af-4d30-b3b4-0b3dddd397f4 + - `slt` and `slti`: if `rs < rt`/`rs < imm` then `rd=1` else `rd=0` + - MIPS assemblers use the combination `slt/slti` and `beq/bne` and `$zero` to create all relative conditions + - `sltu/stliu` signed and unsigned comparison are different, thus an unsigned version is provided + - Case/Switch Statement: *jump address table* and `jr` instruction (the runtime destination address is stored in register) + hl-page:: 118 + ls-type:: annotation + id:: 644159a7-3b96-4924-8260-0cb300307c86 + hl-color:: yellow +- dichotomy + ls-type:: annotation + hl-page:: 117 + hl-color:: green + id:: 6441591a-02ed-4556-8fd7-5fdb310063e7 +- Supporting Procedures in Computer Hardware + ls-type:: annotation + hl-page:: 119 + hl-color:: yellow + id:: 644156f5-e485-4140-be11-6ef87a585383 + - `jal` jumps to an address and simultaneously saves the address of the following instruction in `$ra` + - `jr` jumps to the address specified in a register + - Calling convention for register: + - `$a0-$a3`: four argument registers in which to pass parameters + - `$v0–$v1`: two value registers in which to return values + - `$ra`: one return address register to return to the point of origin + - `$t0–$t9`: temporary registers that are not preserved by the *callee* on a procedure call + id:: 644163d9-8d4b-43e8-acec-57a835c4ce48 + - `$s0–$s7`: saved registers that must be preserved on a procedure call (if used, *callee* saves and restores them) + - `$sp`: stack pointer to the most recently allocated address, `push` substract from `$sp` and `pop` add to `$sp` + - `$fp`: frame pointer to the first word of the frame of a procedure + - `$gp`: pointer to global static data + - FIGURE 2.11 What is and what is not preserved across a procedure call. + ls-type:: annotation + hl-page:: 125 + hl-color:: yellow + id:: 64416615-2966-4adb-a524-845337e588d3 + - Allocating Space for New Data on the Stack + ls-type:: annotation + hl-page:: 126 + hl-color:: yellow + id:: 6441667f-2639-458b-91fd-8bf6b5a2c6ae + - stack is also used to store variables that are local to the procedure but do not fit in registers + - procedure frame or activation record + ls-type:: annotation + hl-page:: 126 + hl-color:: yellow + id:: 64416688-3f6e-444e-b265-3e4a36ec51b8 + - a frame pointer offers a stable base register within a procedure for local memory-references, in that stack pointer changes during the procedure +- spill + ls-type:: annotation + hl-page:: 121 + hl-color:: green + id:: 64416330-597c-4245-8d53-a5dc643ea05f +- wax and wane + ls-type:: annotation + hl-page:: 127 + hl-color:: green + id:: 64416671-9318-4296-9588-c0421c02cdd2 +- ASCII and String + hl-page:: 129 + ls-type:: annotation + id:: 644167c0-1ac2-42df-b01d-4fff03a393e7 + hl-color:: yellow \ No newline at end of file