You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MASTER_ISA.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,18 @@ focuses on instructions whose semantics *literally require* a three-valued persp
44
44
| two or more `0` values | 0 |
45
45
| two or more `−1` values | −1 |
46
46
|`(-1, 0, +1)` (all distinct) | 0 |
47
+
-**TEQUIV** – Tritwise equivalence (balanced ternary XNOR). Returns +1 if both trits match and are non-zero, 0 if either trit is 0, and −1 otherwise. This provides a symmetric similarity test without losing unknown propagation (unlike chaining binary XNOR).
48
+
| input ↓ \ input → | -1 | 0 | +1 |
49
+
|------------------|----|---|----|
50
+
| -1 | +1 | 0 | -1 |
51
+
| 0 | 0 | 0 | 0 |
52
+
| +1 | -1 | 0 | +1 |
53
+
-**TXOR** – Tritwise exclusive-or (a + b mod 3). Outputs 0 when inputs match, ±1 when they differ, and keeps unknowns as neutral. Ideal for ternary hashing/diff operations where sign matters but zero must stay neutral.
54
+
| input ↓ \ input → | -1 | 0 | +1 |
55
+
|------------------|----|---|----|
56
+
| -1 | 0 | -1 | +1 |
57
+
| 0 | -1 | 0 | +1 |
58
+
| +1 | +1 | -1 | 0 |
47
59
48
60
### 2. Control flow that uses three-way decisions
49
61
@@ -54,6 +66,9 @@ focuses on instructions whose semantics *literally require* a three-valued persp
54
66
-**TSIGNJMP** – Jump based on the sign trit of a register (positive/zero/negative), letting
55
67
late-stage code skip redundant compares or flags. A binary design must inspect zero and sign
56
68
flags separately, but balanced ternary exposes the sign trit directly.
69
+
-**TMUX** – Three-way data multiplexer controlled by a ternary trit. Chooses operand A for −1,
70
+
B for 0, and C for +1, mirroring `TBRANCH`’s select logic but for data paths. This avoids chained
71
+
binary muxes in ternary state machines and pairs with the async control arbiter metadata.
57
72
58
73
### 3. Symmetric arithmetic helpers for AI / DSP workloads
59
74
@@ -71,6 +86,7 @@ focuses on instructions whose semantics *literally require* a three-valued persp
71
86
AI weights. Binary quantization typically lands at {0,1} or 8-bit ints; ternary quantization
72
87
captures more information with fewer bits. This helper is critical for runtime math that
73
88
prepares data for `TMIN/TMAX`-style activations.
89
+
-**TNET** – Net trit sum: emit the count of `+1` values minus the count of `−1` values within a register. Balanced ternary makes this reduction carry-free and perfectly symmetric, serving as a lightweight “balance” check for ternary neural networks or error-detecting schemes.
74
90
75
91
### 4. Memory / conversion utilities beyond standard packing
0 commit comments