{
  "title": "How does a CPU run an instruction?",
  "titleSources": [
    {
      "file": "docs/hardware/FACTS-HARDWARE.md",
      "start": 60,
      "end": 68,
      "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
      "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |\n| Address -> source; source -> instruction register; instruction register -> control; control -> ALU; register operands -> ALU; result -> registers | Order of the example's dependencies. | CO/DD, datapath flow. **Not to scale:** sparks loop for emphasis during a phase; they are not transfer counts, buses, actual timing or charges. No load/store operation appears. |\n| “Teaching sequence; pipelined CPUs overlap instruction stages.” | Real processors can overlap work on multiple instructions. | CO/CA, pipelining. The display deliberately presents one instruction in isolation. |"
    }
  ],
  "piece": "instructionCycle",
  "pack": "hardware",
  "wordCount": 163,
  "library": {
    "file": "LIBRARY.md",
    "line": 545,
    "sha256": "39689aa0d11b0a4c0164ed582e382eac4775852ab610239d35c974d6f290610f"
  },
  "pieceDocumentation": {
    "file": "explain/pieces/hardware/instruction-cycle.js",
    "sha256": "fb2cd2aedcaf56efd548c433b312411a06a859474e0362663dcd8680f3a177f7"
  },
  "guide": {
    "file": "docs/hardware/ASSETS-HARDWARE.md",
    "sha256": "3041b4a858f81c631cb51d5cd0af6d35c6d790e9f12a3b696f0e31bdfe9a32f7"
  },
  "paragraphs": [
    {
      "id": "explanation-1",
      "text": "A CPU instruction can be explained in three broad steps: fetch, decode and execute. Fetch brings instruction bits into a form ready to interpret. Decode identifies the operation to perform. Execute carries it out. This demonstration follows a single addition instruction, using readable text in place of the encoded bits a processor would use.",
      "sources": [
        {
          "file": "docs/hardware/FACTS-HARDWARE.md",
          "start": 60,
          "end": 64,
          "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
          "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |"
        }
      ],
      "sentences": [
        {
          "text": "A CPU instruction can be explained in three broad steps: fetch, decode and execute.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 64,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "Fetch brings instruction bits into a form ready to interpret.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 64,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "Decode identifies the operation to perform.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 64,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "Execute carries it out.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 64,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "This demonstration follows a single addition instruction, using readable text in place of the encoded bits a processor would use.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 64,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |"
            }
          ],
          "support": "local ledger or guide"
        }
      ]
    },
    {
      "id": "explanation-2",
      "text": "The example begins with five in register R1 and three in register R2. The arithmetic and logic unit, or ALU, adds them. The result, eight, is written back into R1, while R2 remains three. A program counter selects the instruction address. Here it advances from hexadecimal 100 to 104 for an example four-byte instruction.",
      "sources": [
        {
          "file": "docs/hardware/FACTS-HARDWARE.md",
          "start": 63,
          "end": 66,
          "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
          "text": "| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |"
        },
        {
          "file": "docs/hardware/FACTS-HARDWARE.md",
          "start": 50,
          "end": 50,
          "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
          "text": "| “ALU”; “ALU = arithmetic and logic unit”; “operations” | An ALU performs arithmetic and logical operations. | CO/DD, arithmetic circuits and datapath. **Simplified:** one ALU box; cores can contain multiple integer, floating-point, vector and specialized execution units. |"
        }
      ],
      "sentences": [
        {
          "text": "The example begins with five in register R1 and three in register R2.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 63,
              "end": 66,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 50,
              "end": 50,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “ALU”; “ALU = arithmetic and logic unit”; “operations” | An ALU performs arithmetic and logical operations. | CO/DD, arithmetic circuits and datapath. **Simplified:** one ALU box; cores can contain multiple integer, floating-point, vector and specialized execution units. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "The arithmetic and logic unit, or ALU, adds them.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 63,
              "end": 66,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 50,
              "end": 50,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “ALU”; “ALU = arithmetic and logic unit”; “operations” | An ALU performs arithmetic and logical operations. | CO/DD, arithmetic circuits and datapath. **Simplified:** one ALU box; cores can contain multiple integer, floating-point, vector and specialized execution units. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "The result, eight, is written back into R1, while R2 remains three.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 63,
              "end": 66,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 50,
              "end": 50,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “ALU”; “ALU = arithmetic and logic unit”; “operations” | An ALU performs arithmetic and logical operations. | CO/DD, arithmetic circuits and datapath. **Simplified:** one ALU box; cores can contain multiple integer, floating-point, vector and specialized execution units. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "A program counter selects the instruction address.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 63,
              "end": 66,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 50,
              "end": 50,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “ALU”; “ALU = arithmetic and logic unit”; “operations” | An ALU performs arithmetic and logical operations. | CO/DD, arithmetic circuits and datapath. **Simplified:** one ALU box; cores can contain multiple integer, floating-point, vector and specialized execution units. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "Here it advances from hexadecimal 100 to 104 for an example four-byte instruction.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 63,
              "end": 66,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 50,
              "end": 50,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “ALU”; “ALU = arithmetic and logic unit”; “operations” | An ALU performs arithmetic and logical operations. | CO/DD, arithmetic circuits and datapath. **Simplified:** one ALU box; cores can contain multiple integer, floating-point, vector and specialized execution units. |"
            }
          ],
          "support": "local ledger or guide"
        }
      ]
    },
    {
      "id": "explanation-3",
      "text": "The instruction notation is invented for teaching, not the syntax of a particular processor. The three steps do not imply three clock cycles or exactly three physical pipeline stages. Real pipelined processors can overlap work on several instructions. Moving sparks show the dependencies of this one example, rather than measured transfer speeds or electrical charges.",
      "sources": [
        {
          "file": "docs/hardware/FACTS-HARDWARE.md",
          "start": 60,
          "end": 61,
          "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
          "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |"
        },
        {
          "file": "docs/hardware/FACTS-HARDWARE.md",
          "start": 67,
          "end": 68,
          "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
          "text": "| Address -> source; source -> instruction register; instruction register -> control; control -> ALU; register operands -> ALU; result -> registers | Order of the example's dependencies. | CO/DD, datapath flow. **Not to scale:** sparks loop for emphasis during a phase; they are not transfer counts, buses, actual timing or charges. No load/store operation appears. |\n| “Teaching sequence; pipelined CPUs overlap instruction stages.” | Real processors can overlap work on multiple instructions. | CO/CA, pipelining. The display deliberately presents one instruction in isolation. |"
        }
      ],
      "sentences": [
        {
          "text": "The instruction notation is invented for teaching, not the syntax of a particular processor.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 61,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 67,
              "end": 68,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| Address -> source; source -> instruction register; instruction register -> control; control -> ALU; register operands -> ALU; result -> registers | Order of the example's dependencies. | CO/DD, datapath flow. **Not to scale:** sparks loop for emphasis during a phase; they are not transfer counts, buses, actual timing or charges. No load/store operation appears. |\n| “Teaching sequence; pipelined CPUs overlap instruction stages.” | Real processors can overlap work on multiple instructions. | CO/CA, pipelining. The display deliberately presents one instruction in isolation. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "The three steps do not imply three clock cycles or exactly three physical pipeline stages.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 61,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 67,
              "end": 68,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| Address -> source; source -> instruction register; instruction register -> control; control -> ALU; register operands -> ALU; result -> registers | Order of the example's dependencies. | CO/DD, datapath flow. **Not to scale:** sparks loop for emphasis during a phase; they are not transfer counts, buses, actual timing or charges. No load/store operation appears. |\n| “Teaching sequence; pipelined CPUs overlap instruction stages.” | Real processors can overlap work on multiple instructions. | CO/CA, pipelining. The display deliberately presents one instruction in isolation. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "Real pipelined processors can overlap work on several instructions.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 61,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 67,
              "end": 68,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| Address -> source; source -> instruction register; instruction register -> control; control -> ALU; register operands -> ALU; result -> registers | Order of the example's dependencies. | CO/DD, datapath flow. **Not to scale:** sparks loop for emphasis during a phase; they are not transfer counts, buses, actual timing or charges. No load/store operation appears. |\n| “Teaching sequence; pipelined CPUs overlap instruction stages.” | Real processors can overlap work on multiple instructions. | CO/CA, pipelining. The display deliberately presents one instruction in isolation. |"
            }
          ],
          "support": "local ledger or guide"
        },
        {
          "text": "Moving sparks show the dependencies of this one example, rather than measured transfer speeds or electrical charges.",
          "sources": [
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 60,
              "end": 61,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |"
            },
            {
              "file": "docs/hardware/FACTS-HARDWARE.md",
              "start": 67,
              "end": 68,
              "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
              "text": "| Address -> source; source -> instruction register; instruction register -> control; control -> ALU; register operands -> ALU; result -> registers | Order of the example's dependencies. | CO/DD, datapath flow. **Not to scale:** sparks loop for emphasis during a phase; they are not transfer counts, buses, actual timing or charges. No load/store operation appears. |\n| “Teaching sequence; pipelined CPUs overlap instruction stages.” | Real processors can overlap work on multiple instructions. | CO/CA, pipelining. The display deliberately presents one instruction in isolation. |"
            }
          ],
          "support": "local ledger or guide"
        }
      ]
    }
  ],
  "generalKnowledge": [],
  "readerNote": {
    "text": "Based on the hardware fact ledger’s computer-organization and digital-design references. One invented addition instruction illustrates dependencies; three steps do not mean three clock cycles or pipeline stages.",
    "lines": [
      [
        20,
        23
      ],
      [
        60,
        73
      ]
    ],
    "sources": [
      {
        "file": "docs/hardware/FACTS-HARDWARE.md",
        "start": 20,
        "end": 23,
        "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
        "text": "| CO | Patterson & Hennessy, *Computer Organization and Design: The Hardware/Software Interface*, RISC-V Edition: processors, datapath/control, memory hierarchy, parallel processors. |\n| CA | Hennessy & Patterson, *Computer Architecture: A Quantitative Approach*: cache organization, instruction-level parallelism, multicore and GPU throughput. |\n| DD | Harris & Harris, *Digital Design and Computer Architecture*: number systems, Boolean logic, gate symbols, combinational adders, CMOS transistor switch model. |\n| CS | Bryant & O'Hallaron, *Computer Systems: A Programmer's Perspective*, 3rd edition: information representation, processor operation, storage technologies and memory hierarchy. |"
      },
      {
        "file": "docs/hardware/FACTS-HARDWARE.md",
        "start": 60,
        "end": 68,
        "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
        "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |\n| Address -> source; source -> instruction register; instruction register -> control; control -> ALU; register operands -> ALU; result -> registers | Order of the example's dependencies. | CO/DD, datapath flow. **Not to scale:** sparks loop for emphasis during a phase; they are not transfer counts, buses, actual timing or charges. No load/store operation appears. |\n| “Teaching sequence; pipelined CPUs overlap instruction stages.” | Real processors can overlap work on multiple instructions. | CO/CA, pipelining. The display deliberately presents one instruction in isolation. |"
      }
    ]
  },
  "facts": [
    {
      "file": "docs/hardware/FACTS-HARDWARE.md",
      "start": 60,
      "end": 68,
      "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
      "text": "| “Fetch, decode, execute”; numbered “1 Fetch”, “2 Decode”, “3 Execute” | Instructions can be explained as fetching, interpreting, then carrying out an operation. | CO/DD/CS, basic processor cycle. **Simplified:** conceptual phases, not exactly three physical pipeline stages or three clock cycles. |\n| “One instruction: ADD R1, R2 (R1 gets R1 + R2)” | This example adds two register values and replaces R1 with the result. | DD/CO, register arithmetic. **Invented teaching notation:** this is a two-operand pseudoinstruction, not a claim about a particular RISC-V/x86/ARM instruction encoding or syntax. |\n| “Memory / cache”, “ADD R1, R2”; “Instruction reg.”; “(waiting)” | Fetch obtains instruction bits and makes them available for decode; the pre-fetch display waits. | CO/CS, instruction fetch. **Simplified:** assembly text stands in for encoded bits; the store abstracts the memory hierarchy. It does not assert a DRAM read for every instruction. The instruction register is a basic teaching model, not a required standalone register in every CPU. |\n| “PC”, “PC: 0x100”, “PC: 0x104”; “PC selects an instruction address.” | The program counter identifies the instruction address; a sequential instruction can advance it. | CO/DD. **Example:** fixed 4-byte instruction, address 256 then 260 decimal. No branch, variable instruction length, exception or fetch queue is modeled. |\n| “Control unit”, “Decode ADD”; “The control unit interprets the instruction.” | Decode identifies what operation to perform. | CO/DD, opcode decoding/control. **Simplified:** immediate/special fields and register-address decoding are not expanded. |\n| “ALU”, “5 + 3 = 8” (or the custom `a + b = result`), “Operands go to the ALU; it adds them.” | ADD applies addition to the register operands. | DD/CO; arithmetic checked. Operands are bounded integers 0..99, so the model's largest result is 198; no fixed-word overflow or flags are claimed. |\n| “R1: 5 R2: 3” then “R1: 8 R2: 3”; “Writeback: the result is now in R1.” | The computed result is written to the destination, preserving R2. | CO, register writeback. **Simplified:** writeback is grouped into execute, not presented as a separately numbered stage. |\n| Address -> source; source -> instruction register; instruction register -> control; control -> ALU; register operands -> ALU; result -> registers | Order of the example's dependencies. | CO/DD, datapath flow. **Not to scale:** sparks loop for emphasis during a phase; they are not transfer counts, buses, actual timing or charges. No load/store operation appears. |\n| “Teaching sequence; pipelined CPUs overlap instruction stages.” | Real processors can overlap work on multiple instructions. | CO/CA, pipelining. The display deliberately presents one instruction in isolation. |"
    }
  ],
  "basis": [
    {
      "file": "docs/hardware/FACTS-HARDWARE.md",
      "start": 16,
      "end": 27,
      "sha256": "bd55945786f1c9b9b4aa5eccbd887749c307c486675b04f4313efb530b583b60",
      "text": "## Basis key\n\n| Key | Textbook / primary basis and relevant topic |\n|---|---|\n| CO | Patterson & Hennessy, *Computer Organization and Design: The Hardware/Software Interface*, RISC-V Edition: processors, datapath/control, memory hierarchy, parallel processors. |\n| CA | Hennessy & Patterson, *Computer Architecture: A Quantitative Approach*: cache organization, instruction-level parallelism, multicore and GPU throughput. |\n| DD | Harris & Harris, *Digital Design and Computer Architecture*: number systems, Boolean logic, gate symbols, combinational adders, CMOS transistor switch model. |\n| CS | Bryant & O'Hallaron, *Computer Systems: A Programmer's Perspective*, 3rd edition: information representation, processor operation, storage technologies and memory hierarchy. |\n| PC | Scott Mueller, *Upgrading and Repairing PCs*: desktop motherboard components, memory/expansion slots, power connectors, firmware and disk boot concepts. |\n| NAND | Micheloni, Crippa & Marelli (editors), *Inside NAND Flash Memories*: charge storage, threshold-voltage sensing, SLC and multilevel NAND. |\n| OS | Silberschatz, Galvin & Gagne, *Operating System Concepts*: bootstrap, kernel initialization, devices, memory and user processes. |\n| UEFI | *UEFI Specification*: boot manager, EFI images and OS-loader handoff. Primary specification identified as the conceptual basis; no current revision/compliance claim or live verification. |"
    }
  ]
}
