title: "同一個 01 並不是同一個語義 01:位元、表示域、定義域與判定域" english_title: "The Same Bits Are Not the Same Semantic Bits: Bit Patterns, Representation Domains, Definition Domains, and Judgment Domains" series: "AI Epistemic Reconstruction Series" paper: "02" author: "Neo.K" date: "2026-08-14" version: "v0.1" document_type: "Research Paper / Formalization Paper" language: "zh-Hant" status: "Research Draft"
同一個 01 並不是同一個語義 01:位元、表示域、定義域與判定域
The Same Bits Are Not the Same Semantic Bits: Bit Patterns, Representation Domains, Definition Domains, and Judgment Domains
作者:Neo.K
系列:AI Epistemic Reconstruction Series — Paper 02
版本:v0.1
日期:2026 年 8 月 14 日
摘要
數位計算系統最終可以由位元序列表示,然而「所有資料都能表示為 0/1」並不推出「0/1 本身已經攜帶足夠語義」。同一個 bit pattern 在不同型別、endianness、記憶體物件、指令集、檔案格式、執行狀態與應用規則中,可以對應完全不同的值與行為。本文將此現象形式化為:
並提出四層解釋架構:
其中:
- :bit carrier domain;
- :representation domain;
- :semantic state domain;
- :judgment domain/rule context;
- :observable consequence。
本文進一步區分「表示域」(representation domain)、「定義域」(definition domain)與「判定域」(judgment domain):表示域決定位元如何被讀成 typed value;定義域決定此值在特定系統中是哪一類可接受對象;判定域則決定該語義狀態在目前規則、時間與上下文下如何參與決策或狀態轉移。
這一形式化與 Typed Assembly Language、abstract interpretation、CompCert/C memory models 及 LLVM bitcast semantics 可形成直接對話:低階資料即使保留相同比特,也不能脫離型別、物件表示、endianness、provenance 與 operational semantics 被完整理解。本文同時以半黑箱 DOS 遊戲逆向作 running case:一個 byte 從 00 變成 64 並不自動意味著「壓力變成 100」,除非已經建立表示、語義與行為三層證據。
本文的核心命題不是否定 bit-level computation,而是指出:
位元是可計算世界的載體之一;語義則來自位元與表示規則、定義域、上下文及判定規則的耦合。
這也解釋了為何 AI 在逆向工程中不能只「看懂 0/1」,而必須主動推定並驗證「這一組 0/1 在此刻屬於哪一個語義域」。
關鍵詞: Bits, Semantics, Types, Representation, Judgment Domain, Abstract Interpretation, Typed Assembly Language, Memory Model, Reverse Engineering, AI Reasoning
1. 問題的起點
常見敘述:
電腦底層全部都是 0 和 1。
作為物理/數位表示層的簡化,這句話並沒有錯。
但是,如果進一步推出:
因為都是 0/1,所以機器所處理的內容本身就是 0/1 語義,
則混淆了:
與:
本文將這個問題寫成:
僅由 本身,通常不能唯一決定:
- integer;
- floating point;
- character;
- instruction;
- pointer;
- bitmap;
- flags;
- compressed stream;
- encrypted bytes;
- game state;
- RNG state。
因此:
除非另給解釋結構。
2. 最小反例:01100100
考慮:
01100100
如果視為 unsigned 8-bit integer:
如果視為 ASCII:
'd'
如果視為 bit flags:
(具體 bit 編號取決於約定)。
如果它是壓縮資料中的一個 byte,則它可能沒有獨立語義。
如果它是 machine instruction 的一部分,其語義必須由 instruction decoder、位置與後續 operand 共同決定。
如果它是遊戲 save 的一個 byte:
offset 0x0334 = 0x64
也不能僅由數值 100 推出:
stress = 100
這就是本文所稱:
同一個物理/載體 01,不等於同一個語義 01。
3. 四層模型
定義四個層級。
3.1 Bit Carrier Domain
這是純位元集合。
例如:
在此層沒有:
- signedness;
- unit;
- variable name;
- gameplay meaning;
- legal operation。
3.2 Representation Domain
存在 representation map:
指定表示協定。
例如:
則:
若:
則:
因此:
完全可能。
3.3 Semantic State Domain
即使知道:
仍不知道它代表:
100 gold
100 stress
100 HP
100 percent
100 frames
100 milliseconds
因此再定義:
其中 是 system context。
例如:
3.4 Judgment Domain
即使知道:
也還不知道此值如何作用。
定義:
例如:
所以完整鏈:
4. 三個核心「域」
本文提出三個容易混淆、但應被分開的域。
Definition 1 — Representation Domain
表示域回答:
這些 bits 應如何被讀?
包括:
- bit width;
- signedness;
- endianness;
- floating-point format;
- encoding;
- pointer width;
- field alignment。
Definition 2 — Definition Domain
定義域回答:
這個 typed value 在本系統中屬於哪一種語義對象?
例如:
而:
同一個 integer 100 也可能屬於:
Definition 3 — Judgment Domain
判定域回答:
在目前規則中,這個語義對象如何被使用?
例如:
5. 「相同 bit」的等價關係
設兩個狀態:
與:
Bit-equivalence
若:
稱:
Representation-equivalence
若:
稱:
Semantic-equivalence
若:
稱:
Behavioral-equivalence
若對相關 action 集合:
有:
稱:
6. 等價層級不可以逆推
通常:
不必意味:
兩個不同實作可以產生相同行為。
同樣:
也不意味:
所以:
是本文的核心結構。
7. LLVM bitcast 是一個很直接的現代例子
LLVM 的 bitcast 允許在不改變位元的情況下,將一個值轉為另一個相同 bit-width 的型別。
抽象化:
但:
因此:
與:
可以不同。
此外,endianness 會影響 vector 與 integer 之間 bitcast 的元素位置。
因此:
bits unchanged
並不等價於:
typed interpretation unchanged。
這正是:
8. Type 本身就是語義約束
Typed Assembly Language(TAL)的重要意義之一,在於:
即使到了 assembly-like low-level language,仍可透過 type system 保存與驗證高階不變量。
若「machine level 只剩 bits,因此 type / semantics 沒有意義」成立,TAL 的整個研究方向就失去基礎。
實際情況相反:
低階程式仍然可以擁有:
- types;
- invariants;
- calling convention;
- heap shape;
- code pointers;
- control-flow assumptions。
9. Memory Object 與 Raw Bytes 不同
現代 C memory-model 研究特別清楚地顯示:
記憶體不只是「一串 bytes」。
同一 physical storage 的合法解讀受到:
- object lifetime;
- effective type;
- alignment;
- pointer provenance;
- union state;
- padding;
- permissions;
等條件限制。
因此可以有:
但不同:
這表示 judgment domain 不只是抽象哲學概念,而直接影響:
程式是否具有 defined behavior。
10. CompCert:語義保存不是 byte 保存
Verified compiler 的核心目標通常不是:
編譯前後 bytes 一樣。
這顯然不可能。
而是:
CompCert 的 memory model 與 semantic-preservation proofs 正好表明:
不同 representation 可以維持語義/行為關係。
所以:
或:
比:
更接近編譯正確性的研究目標。
11. Abstract Interpretation 與「選擇哪一個域」
Abstract interpretation 的核心精神是:
對 concrete semantics 選擇一個適合任務的 abstract domain。
形式上可以寫:
其中:
- :concrete domain;
- :abstract domain。
同一 concrete execution 可以被投影到:
- interval;
- sign;
- constant propagation;
- reachability;
- alias;
- taint;
等不同抽象域。
因此:
並不矛盾。
12. 本文與 Abstract Interpretation 的差異
本文不等同於 abstract interpretation。
Abstract interpretation 主要研究:
如何以 sound abstraction 近似程式 semantics。
本文的問題更前置:
當原始 representation 只有 partial structure 時,解釋者如何先決定哪些 bits 應被映射到哪一種 representation / semantic / judgment domain?
因此本文關心:
與:
13. AI 逆向的第一個任務不是猜值,而是猜域
傳統說法容易想像:
AI 看見某個 byte,猜它的值是多少。
但 byte 本身的數值早已知道。
真正未知的是:
也就是:
這一段資料屬於哪個表示/語義域?
14. Domain Hypothesis
定義一個候選:
domain_hypothesis:
bytes: "64 00"
representation:
width: 16
endian: little
type: unsigned_integer
semantic:
name: stress
range: [0, 999]
judgment:
consumers:
- disease_rule
- rest_rule
confidence: 0.42
這比:
0x64 = 100
包含更多真正有用的知識。
15. Domain Validation
一個 domain hypothesis 應通過至少三層驗證。
Layer A — Representation Test
確認:
- width;
- endian;
- encoding;
- signedness。
Layer B — Semantic Intervention Test
只改變候選語義:
觀察 candidate bytes 是否同步。
Layer C — Judgment Test
確認規則真的使用該狀態:
在預期條件下成立。
16. 僅找到 Offset 仍不代表完整理解
如果已知道:
0x50–0x51 = Stress
那只是:
的一部分。
仍未知:
- range;
- clamping;
- update timing;
- rule dependencies;
- derived state;
- transient copy;
- event thresholds。
所以:
17. Running Case:00 → 64
假設 save diff:
offset 0x0334
00 → 64
最弱結論只有:
錯誤跳躍
直接說:
stress became 100
同時偷偷假設了:
- width = 8 bit;
- unsigned;
- little-endian 無關;
- semantic label = stress;
- value 100 不是 cache;
- save write 是 persistent gameplay state。
任何一項都可能錯。
18. 正確的分層推論
Step 1
確定。
Step 2
候選:
Step 3
假說:
Step 4
設計 intervention:
change only stress
→ save
→ diff
Step 5
再測 judgment:
rest / work / event
→ candidate field changes as predicted
這才逐步建立:
19. 同值不等於同義
考慮:
可能:
也可能:
即使:
完全一樣,
其 operational consequences:
與:
不同。
所以:
20. Unit 也是定義域的一部分
數字:
若單位不同:
- 100 ms;
- 100 frames;
- 100 bytes;
- 100 gold;
- 100 percent;
不可交換。
因此更完整的 semantic value:
其中:
- :numeric payload;
- :unit;
- :role。
21. Context-dependent Semantics
有些 field 的意義還依賴版本:
例如同一 offset:
0x70
在版本 A 可以是:
Cleaning
在版本 B 可以是:
Gold
因此:
不能省略版本。
22. Dynamic Role
同一記憶體區也可能在不同時間被重用。
因此:
這在:
- stack;
- union;
- overlay;
- buffers;
- registers;
中特別常見。
所以語義映射應容許:
23. 判定域不是單純 metadata
如果:
stress = 100
但沒有任何 rule 讀這個值,
它在當前 gameplay slice 可能只是 dormant state。
如果:
讀取它,
它才在該判定中成為 active cause / condition。
因此:
24. Judgment Graph
可以建立:
Stress
├─ RestRule
├─ WorkRule
├─ DiseaseRule
└─ EventRule
也就是:
其中 node 是 semantic state / rule,edge 表示:
此 rule 讀取或修改此 state。
25. 從資料字典到可執行語義圖
低階逆向的成熟度可以分:
Level 0 — Bytes
0x50: 34 12
Level 1 — Typed Value
uint16_le = 4660
Level 2 — Semantic Label
stress = 4660
Level 3 — Constraint
stress ∈ [0,999]
Level 4 — Transition
rest → stress - Δ
Level 5 — Judgment Graph
stress → disease_event
26. Semantic Maturity
定義:
不應把:
的 offset label 誤稱為:
的完整理解。
27. AI 的 domain error
本文把 AI 逆向錯誤分成四類。
Type I — Representation Error
例如:
- endian 錯;
- width 錯;
- signedness 錯。
Type II — Semantic Label Error
值讀對,但名字錯。
Type III — Domain Constraint Error
名字對,但 range / unit / lifecycle 錯。
Type IV — Judgment Error
state mapping 對,但不知道哪個 rule 使用它。
28. 一個很重要的推論
AI 如果只提高:
並不能保證提高:
所以 evaluation 應分層。
29. Domain-Aware Reverse Engineering Score
可以定義:
其中:
- :representation accuracy;
- :semantic label accuracy;
- :domain constraint accuracy;
- :judgment / rule accuracy。
30. 為什麼金手指只是 Semantic Anchor
Cheat table 通常可以提供:
的一部分。
例如:
0x50 = Stress
但常缺:
即:
它不知道遊戲怎麼用 Stress。
所以:
31. 對「機器只是 01」的精確修正
可以接受:
但不接受:
較精確:
32. 01 本體論與 01 解釋論
應區分:
Bit Ontology Claim
系統底層物理表示可以由 bit state 描述。
Bit Semantic Claim
bit pattern 本身已完整決定高階意義。
第一個可以成立。
第二個需要:
才能成立。
33. 「所有東西都能編碼成 bit」也不能反推語義
存在 injective encoding:
只證明:
可以被 bit representation 承載。
不證明:
任意看到 的觀察者,不知道 也能恢復 。
解碼需要:
或等價的 decoding convention。
34. 壓縮與加密提供另一個極端例子
壓縮資料:
沒有 codec 就無法得到原結構。
加密資料:
即使知道 bits,也不能沒有:
與:
得到:
所以:
不等於:
35. 對 AI 的直接含義
AI 看到 binary 時,需要推論的不是只有:
這串 bit 最像什麼?
而是:
- representation candidate;
- structure candidate;
- semantic candidate;
- lifecycle candidate;
- rule-consumer candidate。
也就是:
36. Domain Search
把逆向寫成:
其中:
- :binary evidence;
- :dynamic evidence。
37. Active Domain Identification
AI 可以選 action:
使不同 domain hypotheses 產生最大差異。
理想:
這會在 Paper 03 / 06 更完整展開。
38. Domain Collapse
如果某個實驗讓:
則:
被排除。
候選域:
逐步縮成:
39. Definition Domain 與 Judgment Domain 必須分離的原因
同一 state:
可以被不同遊戲版本用不同規則:
所以:
field layout 相同
仍不保證:
gameplay rules 相同。
40. 對版本考古的意義
因此版本比較應分:
Representation Diff
Semantic-State Diff
Judgment-Rule Diff
Presentation Diff
而不是只做:
file diff
41. Version Semantic Tensor
可以表示:
兩版本:
42. 這正是 DOS ↔ Refine 應該怎麼比
假設兩版都叫 .GNX。
這只表示:
不推出:
更不推出:
43. 與 Game Rebirth 的直接關係
如果要重建舊遊戲,真正需要的不是:
而是:
新的 engine 可以:
但:
44. 所以「重新編譯」不是 byte-preserving
Game Rebirth 的理想是:
而不是:
45. 對 AI 理解問題的限制
本文並不主張:
只要 AI 能找 domain,就證明它有人類式理解。
本文只提出可操作能力:
這是一種可測量的 semantic reconstruction ability。
46. 可證偽預測一
若只提供 static bytes,而不允許 dynamic experiment:
應明顯低於允許 runtime interaction 的 Agent。
47. 可證偽預測二
提供 verified historical semantic anchors:
應更快提升,
但:
不一定同比例提升。
48. 可證偽預測三
若故意改變 field offset,但保持 gameplay semantics:
memorization-based system 應顯著下降。
domain-reconstructing system 則應可重新定位。
49. 可證偽預測四
若保持 bytes 不變但改變 decoding convention:
與:
應改變。
這可直接測試:
bit equality 是否足以保證 semantic equality。
答案應為否。
50. 可證偽預測五
若兩個 runtime 使用不同 representation,但通過相同 observation corpus:
則:
與:
可以同時成立。
51. 與 Paper 01 的接口
Paper 01 提出:
Paper 02 補充:
Agent 的 不能只被理解成 raw bytes。
更完整:
而 verifier:
本身也工作在特定 judgment domain:
52. 與 Paper 03 的接口
Paper 03 將處理:
AI 如何從 prior 與 tool knowledge 出發,主動搜尋:
即:
53. 核心定理式命題
Proposition 1 — Bit Identity Insufficiency
存在:
使:
但:
Proof by construction
取:
令:
與:
則:
而:
兩者 bit-identical,但 semantic objects 不同。QED.
54. Proposition 2 — Representation Identity Does Not Imply Judgment Identity
存在兩個系統:
使:
相同,
但:
例如相同 stress=100,版本 A 與版本 B 使用不同事件 threshold。
因此:
55. Proposition 3 — Behavioral Equivalence Does Not Require Bit Identity
存在不同 implementation:
但對 observation contract:
所以:
這是現代重實作的形式基礎之一。
56. Semantic Interpretation Function
本文提出:
其中:
- :representation domain;
- :semantic definition domain;
- :context;
- :judgment rules;
- :time / lifecycle。
57. 最簡版本
若不需要完整參數:
這就是:
「請問這個 01 現在到底是哪一個語義的 01?」
的形式化版本。
58. 對計算哲學的含義
可以同時接受:
與:
兩句完全不衝突。
59. 自我描述需要額外結構
一個 representation 若想 self-describing,通常需加入:
- schema;
- tags;
- type metadata;
- field names;
- version;
- ontology。
也就是用更多 bits 來描述:
其他 bits 應怎麼被解。
60. Legacy Binary 為何特別難
舊 binary 常移除或缺少:
- symbol names;
- debug info;
- source types;
- schema;
- explicit metadata。
因此:
被高度壓縮或遺失。
逆向工程做的其實是:
61. 現代 AI 為什麼仍然需要實驗
即使 AI 已知:
- x86;
- DOS;
- C;
- save formats;
- game design;
它只擁有:
的 prior。
特定 target 的:
仍需要 evidence:
62. 工具知識與局部語義的差別
知道:
little-endian 是什麼
不等於知道:
這兩個 bytes 是一個 little-endian Stress。
前者是:
後者是:
63. 這也是 benchmark 的切入口
可以建立:
- 公開 instruction set;
- 公開 toolchain;
- 私有 field layout;
- 私有 semantic mapping。
Agent 可以使用所有通用知識。
但必須現場恢復:
64. Domain-Level Benchmark
評估:
representation identification
semantic field mapping
range/unit inference
rule-consumer recovery
behavioral reimplementation
比只問:
這個 offset 是什麼?
更完整。
65. Domain Confidence
每個 mapping:
mapping:
representation_confidence: 0.99
semantic_confidence: 0.72
constraint_confidence: 0.51
judgment_confidence: 0.28
避免「知道一半卻看起來像全懂」。
66. Evidence Pointer
每個 confidence 都應附:
source
experiment
trace
counterexample
version
所以 semantic knowledge 不是單一 label,而是 evidence-backed graph。
67. 最後回到那一句話
「電腦內部都是 0/1」回答的是:
以什麼載體表示?
它沒有回答:
這些 bits 被哪個規則讀取?
它們屬於哪個型別?
它們在目前系統代表什麼?
它們會造成什麼行為?
這些問題分屬:
68. 最終命題
本文將核心收斂為:
更完整:
69. 結論
位元是數位計算的基礎表示,但不是自帶解釋的語義單位。
一個 bit pattern 的完整操作意義至少依賴:
- 如何解碼;
- 它屬於哪個資料/物件型別;
- 它在系統中代表哪個 state;
- 此 state 在當前版本與時間中被哪些 rules 使用。
因此:
這也解釋了為什麼半黑箱逆向對 AI 是一個高品質研究問題。
AI 真正需要恢復的不是:
「這裡有哪些 0 和 1?」
而是:
「這些 0 和 1 在這個計算世界裡,現在被當成什麼?」
當這個問題從直覺被提升為 representation-domain、semantic-domain 與 judgment-domain 的可驗證推論時,「同一個 01 並不是同一個語義 01」就不再只是比喻,而成為一個可以被程式語言理論、逆向工程與 AI Agent 實驗共同研究的形式命題。
70. 後續
Paper 03:從先驗到未知語義:AI 在半黑箱環境中的主動認識重構
將正式研究:
並區分:
- latent retrieval;
- historical prior;
- fresh evidence;
- active experimentation;
- semantic reconstruction。
References
[1] Morrisett, G., Walker, D., Crary, K., & Glew, N. From System F to Typed Assembly Language. POPL 1998 / extended journal version.
https://doi.org/10.1145/268946.268954
[2] Cousot, P., & Cousot, R. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. POPL 1977.
https://www.di.ens.fr/~cousot/COUSOTpapers/POPL77.shtml
[3] Leroy, X., & Blazy, S. Formal Verification of a C-like Memory Model and Its Uses for Verifying Program Transformations. Journal / CompCert memory-model work.
https://compcert.org/compcert_bib.html
[4] Krebbers, R. A Formal C Memory Model for Separation Logic. Journal of Automated Reasoning; arXiv:1509.03339.
https://arxiv.org/abs/1509.03339
[5] LLVM Project. LLVM Language Reference Manual. bitcast, memory/object and value semantics.
https://llvm.org/docs/LangRef.html
Appendix A — 層級摘要
Bits
│
├─ Representation
│ ├─ width
│ ├─ endian
│ ├─ type
│ └─ encoding
│
├─ Semantic Definition
│ ├─ name
│ ├─ range
│ ├─ unit
│ └─ lifecycle
│
├─ Judgment
│ ├─ read-by
│ ├─ write-by
│ ├─ threshold
│ └─ transition
│
└─ Observation
├─ UI
├─ event
├─ save
└─ behavior
Appendix B — AI Domain-Reconstruction Record
semantic_candidate:
carrier:
file: ""
offset: ""
bytes: ""
representation:
width_bits:
endian:
type:
confidence:
definition:
semantic_name:
unit:
range:
lifecycle:
confidence:
judgment:
read_by: []
written_by: []
conditions: []
confidence:
evidence:
static: []
dynamic: []
negative_controls: []
counterexamples: []
status:
- unknown
- candidate
- partially_verified
- verified
- invalidated
Appendix C — 一句話形式
相同的 bits 只能保證載體層相同;只有在表示規則、定義域、上下文與判定域也對齊時,才有理由談語義相同。