算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
design-logic-circuit【设计与创意】Design combinational logic circuits from a functional specification through gate-level implementation. Covers AND, OR, NOT, XOR, NAND, NOR gates; NAND/NOR universality conversions; and standard building blocks including multiplexers, decoders, half/full adders, and ripple-carry adders. Use when translating a Boolean function or truth table into a har…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
由功能規範轉組合邏輯電路至門級實:定入出、導最簡布爾式、映至門級圖、可選轉萬能門基(NAND 或 NOR)、以窮舉模擬對原真值表驗正確。
合成前盡定電路介與行:
## Circuit Specification
- **Name**: [descriptive name]
- **Inputs**: [list with bit widths]
- **Outputs**: [list with bit widths]
- **Function**: [verbal description]
- **Truth table or minterm list**: [table or Sigma notation]
- **Don't-care set**: [d(...) or "none"]
得:全、無糊之規,諸合法入組映至唯一出值。
敗:規糊(缺例、同入異出)→求明。勿假 don't-care,除明言。
用 evaluate-boolean-expression 以求諸出之最簡式:
## Minimal Expressions
| Output | Minimal SOP | Literals | Terms |
|--------|-------------|----------|-------|
| F1 | [expression] | [count] | [count] |
| F2 | [expression] | [count] | [count] |
- **Shared sub-expressions**: [list, if any]
得:各出最簡布爾式,多出電路共子式已識。
敗:式似非最簡(字母多於預期)→由 evaluate-boolean-expression 重行 K 圖或 Quine-McCluskey。變量 > 6 用 Espresso 或類啟發簡化。
轉布爾式為門網:
## Gate-Level Netlist
| Gate ID | Type | Inputs | Output | Fan-in |
|---------|------|-------------|--------|--------|
| G1 | NOT | A | A' | 1 |
| G2 | AND | A', B | w1 | 2 |
| G3 | AND | A, C | w2 | 2 |
| G4 | OR | w1, w2 | F | 2 |
- **Total gates**: [count]
- **Critical path depth**: [number of gate levels from input to output]
得:全門級網表,各出經門鏈回溯至原入,無浮(未連)之入或出。
敗:網表有懸線或反饋迴(組合電路不合)→重查映。各訊宜有唯一驅且各門入宜連原入或他門出。
轉電路為僅 NAND 或僅 NOR:
A + B = ((A')*(B'))' = NAND(A', B') → NOT 諸入後 NANDA' = NAND(A, A)A * B = ((A')+(B'))' = NOR(A', B')NOR(A, A)## Universal Gate Conversion
- **Target basis**: [NAND-only / NOR-only]
- **Gates before conversion**: [count]
- **Gates after conversion**: [count]
- **Gates after bubble-push optimization**: [count]
- **Conversion netlist**: [updated table]
得:功能等價電路僅用目門類,冗反已消於氣泡推。
敗:轉後反多於預期→重查氣泡推。常誤乃忘 NAND 與 NOR 於補下自對偶—由出至入連貫施 De Morgan 以避。
確電路於諸入組出正確:
## Simulation Results
- **Total test vectors**: [count]
- **Vectors passed**: [count]
- **Vectors failed**: [count, with details if any]
- **Critical path**: [gate sequence, e.g., G1 -> G3 -> G7 -> G9]
- **Critical path depth**: [N gate levels]
- **Estimated worst-case delay**: [N * gate_delay]
得:諸向量皆過。電路功正且關鍵路深已書。
敗:某向量敗→對該入追訊路門門以得首門出錯。常因:線接錯門入、缺反、或 NAND/NOR 轉誤。
evaluate-boolean-expressionbuild-sequential-circuitsimulate-cpu-architecture