Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Balanced ternary
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Applications == === In computer design === [[File:Balanced ternary operation tables.svg|thumb|Operation tables]]<!--Maybe that "al TRIT più alto" table deserves some explanation.--> 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. Particularly, the plus–minus consistency cuts down the carry rate in multi-digit multiplication, and the rounding–truncation equivalence cuts down the carry rate in rounding on fractions. 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. Knuth wrote that "Perhaps the symmetric properties and simple arithmetic of this number system will prove to be quite important some day,"<ref name="Knuth"/> noting that, {{quote|The complexity of arithmetic circuitry for balanced ternary arithmetic is not much greater than it is for the binary system, and a given number requires only <math>\log_3 2 \approx 63 \%</math> as many digit positions for its representation."<ref name="Knuth"/>}} 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.<ref>{{cite arXiv | last = Li | first = Fengfu | title = Ternary Weight Networks |date = 2022 | class = cs.CV | eprint = 1605.04711 }}</ref><ref>{{cite arxiv | last = Ma | first = Shuming | title = The era of 1-bit LLMs: All large language models are in 1.58 bits | date = 2024 | arxiv = 2402.17764 }}</ref> Balanced ternary may also provide a more natural representation for the [[qutrit]] and quantum computing systems that use it. === Other applications === 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]]<ref>{{cite journal | last = Andrews | first = George E. | doi = 10.1090/S0273-0979-07-01180-9 | issue = 4 | journal = Bulletin of the American Mathematical Society | mr = 2338365 | pages = 561–573 | series = New Series | title = Euler's "De Partitio numerorum" | volume = 44 | year = 2007| doi-access = free }}</ref> :<math>\prod_{n=0}^{\infty} \left(x^{-3^n}+1+x^{3^n}\right)=\sum_{n=-\infty}^{\infty}x^n.</math> Balanced ternary has other applications besides computing. For example, a classical two-pan [[Weighing scale#Balance|balance]], with one weight for each power of 3, can weigh relatively heavy objects accurately with a small number of weights, by moving weights between the two pans and the table. For example, with weights for each power of 3 through 81, a 60-gram object (60<sub>dec</sub> = 1T1T0<sub>bal3</sub>) will be balanced perfectly with an 81 gram weight in the other pan, the 27 gram weight in its own pan, the 9 gram weight in the other pan, the 3 gram weight in its own pan, and the 1 gram weight set aside. Similarly, consider a currency system with coins worth 1¤, 3¤, 9¤, 27¤, 81¤. If the buyer and the seller each have only one of each kind of coin, any transaction up to 121¤ is possible. For example, if the price is 7¤ (7<sub>dec</sub> = 1T1<sub>bal3</sub>), the buyer pays 1¤ + 9¤ and receives 3¤ in change.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)