Terscii: A Ternary ASCII Encoding

Terscii is a character encoding system based on ternary (base-3) digits. Each character is represented by four trits (ternary digits), where each trit can be n (negative), z (zero), or p (positive).

Character Table

The first two trits select the column, the last two select the row:

nn nz np zn zz zp pn pz pp
nn a j s = NAK 0 9 R I
nz b k t TAB 1 Z Q H
np c l u ( STX 2 Y P G
zn d m v - BKS 3 X O F
zz e n w + NUL 4 W N E
zp f o x , DEL 5 V M D
pn g p y : ETX 6 U L C
pz h q z . LNF 7 T K B
pp i r ) SPC ACK 8 S J A

Design Principles

Symmetry Through Negation

The encoding is symmetrical — to get the inverse of any character, simply negate all its trits (swap n↔︎p):

Column Organization

The first two trits determine the character category:

Prefix Category
nn, nz, np Lowercase letters
zn, zz Symbols & control codes
zp Digits
pn, pz, pp Uppercase letters

Control Codes

Control codes occupy the center columns (zn, zz) and serve dual purposes for protocol-level signaling and text editing:

Code Name Description
NUL Null All zeros — the zero point
BKS/DEL Backspace/Delete 3rd trit zero (operation), 4th trit indicates direction
ETX/STX End/Start Transmission Full signal range (high→low, low→high) for sync
LNF/TAB Line Feed/Tab Whitespace (final 0), small vs large movement
NAK/ACK Nack/Ack Full negative vs full positive

Symbol Mnemonics

The digit-symbol pairings follow visual patterns:

Digit Symbol Mnemonic
0 SPC Zero data = empty space
1 . One dot
2 : Two dots
3 , Curved shape
4 + Four sections
5 - Middle (center of 0-9)
6 ( Matches the curve
7 Tall character that slopes
8 = Two sections stacked
9 ) Matches the curve

Keyboard Layout

A 3×9 grid layout designed to align with ternary structure, plus thumb keys:

Base Layer

q  w  f  p  b  l  u  y  j
a  r  s  t  g  n  e  i  o
z  x  c  d  v  h  m  k  .
    SF BCK SPC LNF SY

Shift Layer

Q  W  F  P  B  L  U  Y  J
A  R  S  T  G  N  E  I  O
Z  X  C  D  V  H  M  K  ,
    ^^ DEL TAB ACK __

Symbol Layer

.  :  ,  +  -  (  '  =  )
1  2  3  4  5  6  7  8  9
F1 F2 F3 F4 F5 F6 ST ET  0
    __ NAK NUL ACK ^^

Thumb Keys

Layout Philosophy