Course
The ternary machine: from a trit to a running program
Every lesson is something to press. Each widget runs the fn bodies of a t27 spec compiled to WebAssembly, so the trits you see are the spec computing, beside the spec you can open in the player.
Course 8, 27 lessons, a live widget and a t27 spec in each: why three, balanced ternary, three-valued logic, adders, multiplying without a multiplier, trits in binary memory, the TRI-27 instruction word, a ternary machine and ternary neurons. Every number on a widget is computed by a compiled t27 spec.
All lessons
Module 1 · Three values
Why three, how balanced ternary writes every number without a sign, and what flipping and cutting trits do.
Module 2 · Logic with unknown
Kleene's three-valued gates, two gates binary has no twin for, and addition as a pair of tables.
Module 3 · Adding trits
The half adder, the full adder and a carry that ripples left, one place at a time.
Module 4 · Multiplying without a multiplier
Copy, drop or flip: a product by one trit, long multiplication, and a MAC that only adds.
Module 5 · Trits in binary memory
Two bits per trit, five trits per byte, and the bits a 27-trit word needs.
Module 6 · The TRI-27 instruction word
The 32-bit word the Trinity emulator decodes: its fields, its 47 opcodes and its 15-bit immediate.
Module 7 · A ternary machine
An ALU built from this course's adders, a three-way jump, and a program you can step.
Module 8 · Three answers
Compare at the highest differing trit, find a number in thirds, sort with three-way compares.
Module 9 · Ternary neurons
Weights of -1, 0, +1: one neuron, a detector and a small layer, with no multiplier anywhere.