Technical Overview · THATTE Stack

From Atom to
Operating System

A layer-by-layer technical walkthrough of the balanced ternary computing stack — device physics, gate design, processor architecture, compiler, and microkernel.

Device Physics Gate Library PANINI CPU ManiT Compiler THATTE-OS TritFS
Motivation

Why Balanced Ternary?

Binary computing uses two states (0, 1). Balanced ternary uses three: −1, 0, +1. The key insight is that base-3 is the most efficient radix for information encoding — each digit carries log₂(3) ≈ 1.585 bits of information compared to 1 bit per binary digit.

Crucially, balanced ternary requires no two's complement representation. Negative numbers are represented naturally, and arithmetic operations on balanced ternary numbers are inherently symmetric around zero. Addition, subtraction, and comparison all become simpler.

At the physical level, a three-voltage-rail device maps naturally to balanced ternary. Current flowing in the positive direction is +1; no current is 0; current in the negative direction is −1. This is more natural than the binary trick of using voltage thresholds.

Binary vs. Ternary Comparison
States per digit2 → 3
Info per digit1.0 → 1.585 bits
Sign representationTwo's complement → Natural
Arithmetic symmetryAsymmetric → Symmetric
Voltage levels2 → 3
NegationBitwise NOT+1 → Flip signs
Ternary Arithmetic Example
Decimal 5 = +1 −1 −1 (trits: 9−3−1=5)
Decimal −5 = −1 +1 +1 (flip all signs)
Negation: just multiply each trit by −1
No two's complement. No overflow asymmetry.
P1 · P2

The THATTE Device — CNT FET Physics

SWCNT@MWCNT Channel

The device channel is a single-wall carbon nanotube (SWCNT) coaxially enclosed within a multi-wall carbon nanotube (MWCNT). This nested geometry achieves two goals simultaneously:

  • The SWCNT provides the active conduction channel, exploiting ballistic transport properties
  • The MWCNT acts as a Faraday-cage-like shield, reducing random telegraph noise (RTN) from surrounding charge fluctuations

GNR Gate Electrode

A graphene nanoribbon (GNR) serves as the gate electrode, positioned symmetrically over the SWCNT@MWCNT channel. The bandgap of the GNR is tuned by width to achieve precise ±0.3 V threshold voltages, creating symmetric positive and negative switching behaviour — the physical requirement for balanced ternary.

Three-Rail Operation

Unlike conventional transistors with two power rails, the THATTE device operates with three: VDD (+1 V), GND (0 V), and VSS (−1 V). The drain current's direction and magnitude encodes the three trit states, with transitions controlled by gate voltage.

  • Channel typeSWCNT@MWCNT (coaxial)
  • Gate materialGraphene Nanoribbon (GNR)
  • Positive threshold Vth++0.3 V
  • Negative threshold Vth−−0.3 V
  • Power supply VDD+1.0 V
  • Ground GND0.0 V
  • Negative supply VSS−1.0 V
  • Noise mechanismRTN (Random Telegraph Noise)
  • Shielding methodCoaxial MWCNT geometry
  • Logic encodingCurrent direction (ID)
  • Logic statesID<0 → −1, ID≈0 → 0, ID>0 → +1
P3

Fabrication — CVD with Benzene Precursor

The fabrication process uses chemical vapor deposition (CVD) with benzene (C₆H₆) as the carbon source. Benzene was chosen because its aromatic ring structure provides natural control over chirality during nanotube nucleation — a critical parameter for achieving the precise bandgap needed for ±0.3 V threshold symmetry.

The process proceeds in stages: substrate preparation, catalyst nanoparticle deposition, SWCNT growth under controlled temperature and gas flow, MWCNT overgrowth for coaxial shielding, and GNR gate formation by selective oxidation of a graphene sheet along a lithography-defined nanoribbon.

A notarized affidavit (Exhibit A) establishes that the core device concept was conceived in 2006, providing documentary evidence of priority.

CVD Process Stages
1. Substrate prepSiO₂ / Si wafer, clean
2. Catalyst depositFe nanoparticles, CVD
3. SWCNT growthC₆H₆ precursor, 900°C
4. MWCNT sheathCoaxial overgrowth
5. GNR gateGraphene + litho + oxidation
6. Contact metalPd source/drain contacts
Priority date2006 (affidavit)
P6 · SPICE Verified

Gate Library — Standard Cells

Four standard cells form the basis of the THATTE gate library. Each was designed at the transistor level using THATTE device models and verified by simulation with the Stanford University CNFET SPICE model (Deng & Wong, IEEE Trans. Electron Devices, 2007).

TINV — Ternary Inverter

Complementary CNFET Pair

Two complementary THATTE devices in series, one with positive and one with negative threshold. Input +1 → Output −1, Input 0 → Output 0, Input −1 → Output +1. Current symmetry |I(−1)/I(+1)| = 1.0000.

TMIN2 — Ternary Minimum

Series CNFET Pair

Two devices in series. Output equals the minimum of two trit inputs. Forms the basis of ternary NOR-equivalent logic. Implements min(A, B) = −max(−A, −B) dually.

TMAX3 — Ternary Maximum

Parallel Triple Arrangement

Three devices in parallel. Output equals the maximum of three trit inputs. Together with TMIN2, allows full ternary combinational logic implementation.

TMAJ3 — Ternary Majority

Median of Three Inputs

Implements median(A, B, C) — the majority logic gate for balanced ternary. Verified against all 27 possible three-trit input combinations. 27/27 correct.

TINV SPICE Verification PASS
PlatformDebian 13, AMD EPYC 9334
Simulatorngspice-44.2 (KLU solver)
ModelStanford CNFET (2007)
VDD / GND / VSS+1 V / 0 V / −1 V
Vth symmetry target±0.3 V Met
|I(−1) / I(+1)|1.0000 Pass
Ioff (midpoint)28.58 mA
Leakage (endpoints)2.01 pA
TMAJ3 Truth Table (27 entries) 27/27
ABCmedian(A,B,C)Result
−1−1−1−1
−1−10−1
−1−1+1−1
−1000
−10+10
−1+1+1+1
0000
00+10
+1+1+1+1
... 18 more entries, all verified ...
P7

PANINI Processor — Ternary CPU

3-FET Cyclic SRAM Cell

Conventional binary SRAM cells use a 6-transistor bistable flip-flop. The PANINI processor introduces a 3-FET cyclic SRAM cell — a novel topology where three cross-coupled THATTE devices form a cell with three stable states, not two.

Nodes N1 and N2 are cross-coupled through all three voltage rails. The three stable configurations correspond to the three trit values, providing native ternary storage without requiring a binary-to-ternary encoding layer.

Modulo-3 Clock Generation

A ternary pipeline requires clock phases that divide time into three equal intervals. The PANINI processor implements a modulo-3 clock generator built from TMAJ3 gates and cyclic feedback, producing φ₀, φ₁, φ₂ phases used for three-stage pipeline control.

  • SRAM cell type3-FET Cyclic (novel)
  • Stable states per cell3 (−1, 0, +1)
  • Cross-coupled nodesN1, N2 via VDD/GND/VSS
  • Clock phasesφ₀, φ₁, φ₂ (modulo-3)
  • Pipeline depth3-stage ternary
  • Instruction setT3ISA (P4)
  • ALU operationsTernary ADD/MUL/TMIN/TMAX
P4

ManiT Compiler — T3ISA Toolchain

The ManiT compiler translates balanced ternary assembly source (.t3s files) to binary-encoded T3ISA machine code (.t3b files). A disassembler produces human-readable debug output (.t3d files).

Compilation Pipeline

1

Lexer

Tokenises .t3s source: opcodes, registers, trit literals, labels

2

Parser

Builds AST with instruction types and operand resolution

3

Code Generator

Emits T3ISA encoding; resolves branch targets, labels

4

.t3b Output

Ternary binary: balanced ternary encoded machine instructions

; ManiT Assembly — T3ISA Example
; Load trit constant +1 into register r0
TLOAD  r0, #[+1]

; Load trit constant −1 into register r1
TLOAD  r1, #[-1]

; Ternary ADD: r2 = r0 + r1 = 0
TADD   r2, r0, r1

; Conditional branch on zero
TBRZ   r2, .zero_case

; TMAJ3: majority of r0, r1, r2 → r3
TMAJ3  r3, r0, r1, r2

; Syscall: write trit to output
TSYS   0x01, r3
Compiled to .t3b binary by ManiT Compiler v0.1.0 · 21 Mar 2026
P5

THATTE-OS 0.1.0 — Ternary Microkernel

THATTE-OS is a compiled, running microkernel for balanced ternary hardware. Written in ManiT assembly, compiled by the ManiT compiler to nine .t3b binary modules, with full debug traces attached as patent appendices.

Privilege Domain System

The kernel implements three privilege domains — kernel (−1), supervisor (0), user (+1) — one per trit state. Privilege escalation and de-escalation are controlled by the 4-entry status register via dedicated TSYS/TRET instructions.

Kernel Modules

  • boot.t3b — hardware init, memory map, jumps to init
  • init.t3b — kernel entry, sets up stack, loads modules
  • sched.t3b — modulo-3 round-robin process scheduler
  • irq.t3b — interrupt vector table, IRQ dispatch
  • proc.t3b — process creation, context switch
  • syscall.t3b — T3ISA syscall interface layer
  • mem.t3b — TritFS heap allocator integration
  • io.t3b — ternary I/O port abstraction
  • thatte_os.t3b — main kernel binary (all modules linked)
thatte-os boot trace
THATTE-OS 0.1.0 — Balanced Ternary Microkernel
Platform: PANINI v0.1 — T3ISA
 
[BOOT] Loading boot.t3b ............ OK
[BOOT] init.t3b entry at 0x0T00 ... OK
[KERN] Privilege: KERNEL (−1)
[KERN] Status register: [−1|0|−1|0]
[SCHED] Round-robin, 3 slots ...... READY
[IRQ] Interrupt table: 27 entries . LOADED
[MEM] TritFS heap @ 0x0T81 ........ MOUNTED
[IO] Ternary I/O ports: 3 ......... ACTIVE
 
THATTE-OS BOOT COMPLETE — 3-TRIT SYSTEM RUNNING
T3>
P8 · P9

TritFS & TritTrie — Storage Stack

TritFS — Balanced Ternary Filesystem

TritFS addresses all storage resources using balanced ternary. A 5-trit address provides 3⁵ = 243 addressable locations. Memory heap blocks, file system inodes, and network buffers are all allocated using trit-arithmetic operations, eliminating the need for binary-to-ternary address conversion layers.

Appendix C of P8 contains a complete 128-entry ASCII-to-balanced-ternary encoding table, enabling ternary-native text processing in THATTE-OS without binary translation.

TritTrie — Ternary Index Structure

A trie where each node has exactly three children, indexed by trit state (−1, 0, +1). Provides O(k) lookup, insert, and delete for trit-encoded keys of depth k. Used by TritFS for directory indexing and by the ManiT compiler for symbol tables.

TritFS Address Space
Address width5 trits
Addressable locations3⁵ = 243
EncodingMST-first balanced ternary
ASCII table entries128 (Appendix C)
TritTrie branching3 children per node
Lookup complexityO(k), depth k
ApplicationsFS index, symbol table, routing
ASCII Encoding Sample
Char ASCII Balanced Ternary
A65+1 −1 −1 +1 −1
M77+1 0 −1 −1 +1
T84+1 0 +1 0 0