Memory Alpha
Advertisement
Memory Alpha

Trinary code is a term used to describe an advanced form of computer language used by cultures in the galaxy, such as the Federation.

Federation computers use an advanced system, using the data storage measurements quads, kiloquads and gigaquads to measure data. The systems are based in binary code, yet also accomodating the use of trinary. (VOY:"Hope and Fear")

Trinary is a further evolution of binary code. In binary, when electricity is used to transmit or carry data and information, the information is encoded as ones (1) or zeroes (0), with a low "off" voltage representing 0, and an high "on" voltage representing 1. A single one or zero is referred to as a unit of information, referred to as a "bit." By comparison, a trinary code, by definition, is a three-state system, with three different signals possible. This changes the way primitive computations are carried out, but does not increase the capacity of a system or the complexity of data storage or encoding.

While trinary code does not in and of itself represent a more powerful or even significantly different type of computer than those we use today, binary or trinary quantum codes could be exponentially more powerful.

Background

Star Trek computers are frequently referred to operating in binary capacities, such as TNG:"11001001" and VOY:"Favorite Son," however, references to trinary code, and the possible obsolescence of binary, have been made in modern Trek productions.

In "Future's End" (VOY), Harry Kim notes that it would take "a few minutes to reconfigure to their binary system" before they could upload Henry Starling's computer database. This suggests either a different method for storing files as bits is used, or the binary computing system was no longer used at that time.

In "Distant Origin" (VOY), one of the Voth says "simple binary system" while attempting to access and download the Voyager's computer database.

The term "quad" has been theorized to be related to quadratic code, the four-state variation of binary and trinary, however, it has been solidly established that Federation computers utilize both binary and trinary code, and no mention has ever been made of this relationship in any canon sense.

Presumably trinary involves 0,1 and 2. Using an 8 bit code, there are 28 or 256 possible binary states per byte. In trinary, there would be 38 or 6,561 states available per byte. A quadratic code would allow 48 or 65,536 states.

Relation to Information Theory

Digital information can be stored in any primitive unit. An n-state data primitive, or nit, is a generalization of the binary bit, the smallest possible primitive. Since data in trinary or quadratic code is still digital rather than analog or quantum, information can be converted readily between systems. For example, 48 = 65,536 states is the same as 216 states, or 2 bytes in a binary code, and each 4-state primitive could be represented by two bits.

However, an increase in the number of states per data primitive does not represent any increase in computing power or data storage: it is merely a change in the unit of measurement, as between feet and meters. Since fundamental physical limits of data storage are unit-independent, the type of code used is a matter of convention or convenience rather than potential power.

Relation to Quantum Computing

The technology of Star Trek may well include quantum computers, but quantum computing does not necessarily relate to trinary or other codes. A qubit is the 2-state primitive unit of quantum information, and the increase in storage capacity of a quantum computer comes from entanglement of many qubits: the number of possible states of an N-qubit quantum computer goes like 2N, versus 2N in an N-bit classical computer.

The type of code used by a quantum computer would depend on the computer's physical system. Today's qubits are based on 2-state systems, resulting in a binary quantum code. If the computer is based on a 3- or 4-state system, then the quantum code would be trinary or quadratic.

Advertisement