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 photonic-ternary device maps naturally to balanced ternary. A photon plus AC positive phase drives current in the positive direction (+1); no photon means no current (0); a photon plus AC negative phase drives current in the negative direction (−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
Signal encodingVoltage level → Signed current
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.
Thatte1 · Thatte2

The THATTE Device — Photonic-Ternary Transducer

SWCNT@MWCNT Structure

The device is a metallic (8,8) armchair single-wall carbon nanotube (SWCNT) coaxially enclosed within a multi-wall carbon nanotube (MWCNT), separated by a 0.34 nm van der Waals gap. Two concentric carbon tubes — that is the entire device.

  • The SWCNT is a metallic ballistic conductor — the active conduction channel
  • The MWCNT modulates SWCNT conductance via inter-wall quantum coupling, and shields against environmental noise

Photonic-Ternary Mechanism

A photon (~710 nm) absorbed by the MWCNT detunes its energy levels from the SWCNT, weakening inter-wall coupling. SWCNT conductance rises from 1.47 to 1.91 G0. AC terminal polarity then determines the current direction — perfect symmetry I(+V) = −I(−V).

Trit Encoding

Trit +1: photon + AC positive phase = +74 µA. Trit 0: no photon, no AC = 0 µA (noise floor ~35 nA). Trit −1: photon + AC negative phase = −74 µA. SNR > 2000 (54 dB). The device IS a digital switch.

Dual-Photon Mode

Two photons at different wavelengths (one for MWCNT gate, one for SWCNT signal) + AC = 12 distinguishable states from a single device. Wavelength-division multiplexing at the nanotube level.

  • Device structureSWCNT@MWCNT (coaxial, 0.34 nm gap)
  • SWCNT chiralityMetallic (8,8) armchair
  • Optical input~710 nm photon (M11 transition)
  • Electrical inputAC pulse polarity
  • Trit +1 current+74 µA
  • Trit 0 current0 µA (noise floor ~35 nA)
  • Trit −1 current−74 µA
  • SNR> 2000 (54 dB)
  • Simulation methodNEGF quantum transport
  • Dual-photon states12 per device (WDM)
  • Max trit rate~500 GHz − 10 THz
Thatte1

Fabrication — Metallocene CVD

The fabrication process uses metallocene chemical vapor deposition (CVD) — a metallocene precursor (e.g., ferrocene) provides both the catalyst metal and carbon source in a single compound, enabling controlled growth of coaxial SWCNT@MWCNT structures with the required metallic (8,8) armchair chirality.

Bulk carbon nanotubes are grown and then the metallic (8,8) SWCNT population is selected post-growth by Raman spectroscopy — a standard industry workflow. CNTs are abundant (~10⁹ per gram). The MWCNT sheath grows coaxially around the SWCNT, separated by a 0.34 nm van der Waals gap.

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

Metallocene CVD Process
1. Substrate prepSiO₂ / Si wafer, clean
2. Metallocene CVDFerrocene precursor, single-step
3. SWCNT growthMetallic (8,8) armchair
4. MWCNT sheathCoaxial overgrowth, 0.34 nm gap
5. Chirality selectionPost-growth Raman spectroscopy
6. Optical couplingWaveguide / free-space ~710 nm
Priority date2006 (affidavit)
Thatte2 · NEGF Verified

Gate Library — Standard Cells

Four standard cells form the basis of the THATTE gate library. Each operates on the photonic-ternary principle — photon + AC pulse polarity = signed current trit — and was verified by NEGF quantum transport simulation of the SWCNT@MWCNT device.

TINV — Ternary Inverter

Complementary SWCNT@MWCNT 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 SWCNT@MWCNT 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 NEGF Verification PASS
PlatformDebian 13, AMD EPYC 9334
SimulatorNEGF quantum transport (Kwant)
DeviceSWCNT@MWCNT, metallic (8,8)
Optical input~710 nm photon
Electrical inputAC pulse polarity
|I(−1) / I(+1)|1.0000 Pass
SNR> 2000 (54 dB) Pass
Trit current±74 µA
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 ...
Thatte3

PANINI Processor — Ternary CPU

3-FET Cyclic SRAM Cell

Conventional binary SRAM cells use a 6-transistor bi-stable 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 AC phase lines. 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 AC phase lines
  • Clock phasesφ₀, φ₁, φ₂ (modulo-3)
  • Pipeline depth3-stage ternary
  • Instruction setT3ISA (Thatte3)
  • ALU operationsTernary ADD/MUL/TMIN/TMAX
Thatte6

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
Thatte6

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>
Thatte4 · Thatte5

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 Thatte4 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