This stands in contrast to the standard (unbalanced) ternary system, in which digits have values 0, 1 and 2.
The balanced ternary system can represent all integers without using a separate minus sign; the value of the leading non-zero digit of a number has the sign of the number itself.
[1] Balanced ternary makes an early appearance in Michael Stifel's book Arithmetica Integra (1544).
Related signed-digit schemes in other bases have been discussed by John Colson, John Leslie, Augustin-Louis Cauchy, and possibly even the ancient Indian Vedas.
is what rigorously and formally establishes how integer values are assigned to the symbols/glyphs in
One benefit of this formalism is that the definition of "the integers" (however they may be defined) is not conflated with any particular system for writing/representing them; in this way, these two distinct (albeit closely related) concepts are kept separate.
can be computed, where (as before) all integer are written in decimal (base 10) and all elements of
In the following the strings denoting balanced ternary carry the suffix, bal3.
[5] In decimal or binary, integer values and terminating fractions have multiple representations.
Certainly, in the decimal and binary, we may omit the rightmost trailing infinite 0s after the radix point and gain a representations of integer or terminating fraction.
But, in balanced ternary, we can't omit the rightmost trailing infinite −1s after the radix point in order to gain a representations of integer or terminating fraction.
An arithmetic shift left of a balanced ternary number is the equivalent of multiplication by a (positive, integral) power of 3; and an arithmetic shift right of a balanced ternary number is the equivalent of division by a (positive, integral) power of 3.
[7] As a result, if these two representations are used for balanced and unsigned ternary numbers, an unsigned n-trit positive ternary value can be converted to balanced form by adding the bias b and a positive balanced number can be converted to unsigned form by subtracting the bias b.
We may convert to balanced ternary with the following formula: where, For instance, The single-trit addition, subtraction, multiplication and division tables are shown below.
For subtraction and division, which are not commutative, the first operand is given to the left of the table, while the second is given at the top.
For instance, the answer to 1 − T = 1T is found in the bottom left corner of the subtraction table.
Multi-trit addition and subtraction is analogous to that of binary and decimal.
Balanced ternary division is analogous to that of binary and decimal.
The magnitude of the dividend must be compared with that of half the divisor before setting the quotient trit.
For example, Extraction of the cube root in balanced ternary is similarly analogous to extraction in decimal or binary: Like division, we should check the value of half the divisor first too.
As in any other integer base, algebraic irrationals and transcendental numbers do not terminate or repeat.
In the early days of computing, a few experimental Soviet computers were built with balanced ternary instead of binary, the most famous being the Setun, built by Nikolay Brusentsov and Sergei Sobolev.
The notation has a number of computational advantages over traditional binary and ternary.
In balanced ternary, the one-digit multiplication table remains one-digit and has no carry and the addition table has only two carries out of nine entries, compared to unbalanced ternary with one and three respectively.
"[6]More recently, balanced ternary numbers have been proposed for some highly-efficient low-resolution implementations of artificial neural networks.
In deep learning, neural nets usually use continuous (floating-point) values, but there are many works investigating quantisation and binarisation to create neural nets that can run with much lower power and/or lower memory requirements.
Balanced ternary numbers are proposed to be used for the network parameters, because they are extremely compact, but can naturally represent excitatory/inhibitory/null activation patterns.
[8][9] Balanced ternary may also provide a more natural representation for the qutrit and quantum computing systems that use it.
The theorem that every integer has a unique representation in balanced ternary was used by Leonhard Euler to justify the identity of formal power series[10] Balanced ternary has other applications besides computing.
If the buyer and the seller each have only one of each kind of coin, any transaction up to 121¤ is possible.