background preloader

Ternary

Facebook Twitter

Balanced ternary. Balanced ternary is a non-standard positional numeral system (a balanced form), useful for comparison logic. While it is a ternary (base 3) number system, in the standard (unbalanced) ternary system, digits have values 0, 1 and 2. The digits in the balanced ternary system have values −1, 0, and 1. Different sources use different glyphs used to represent the three digits in balanced ternary. In this article, T (which resembles a ligature of the minus sign and 1) represents −1, while 0 and 1 represent themselves. In Setun printings, −1 is represented as overturned 1: "1".[1] Computational properties[edit] 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.

Balanced ternary also has a number of computational advantages over traditional ternary. Conversion to decimal[edit] 10bal. 3 = 1×31 + 0×30 = 310 10Tbal. 3 = 1×32 + 0×31 + −1×30 = 810 where, and. Ternary numeral system. Comparison to other radixes[edit] Sum of the digits in ternary as opposed to binary[edit] The value of a binary number with n bits that are all 1 is 2n − 1.

Similarly, for a number N(b,d) with base b and d digits, all of which are the maximum digit value b − 1, we can write N(b,d) = (b − 1) bd−1 + (b − 1) bd−2 + … + (b − 1) b1 + (b − 1) b0, N(b,d) = (b − 1) (bd−1 + bd−2 + … + b1 + 1), N(b,d) = (b − 1) M. bM = bd + bd−1 + … + b2 + b1, and −M = −bd−1 − bd−2 − … − b1 − 1, so bM − M = bd − 1, or M = (bd − 1)/(b − 1). Then, N(b,d) = (b − 1)M, N(b,d) = (b − 1) (bd − 1)/(b − 1), and N(b,d) = bd − 1. Compact ternary representation: base 9 and 27[edit] Nonary (base 9, each digit is two ternary digits) or septemvigesimal (base 27, each digit is three ternary digits) is often used, similar to how octal and hexadecimal systems are used in place of binary. Practical usage[edit] In certain analog logic, the state of the circuit is often expressed ternary. Tryte[edit] See also[edit] Notes[edit] References[edit] Ternary. Here, we will focus on the numbers from 0 up to 242, expressed in ternary, or base three, arithmetic. Whenever necessary, we will add leading zeroes to the ternary patterns that we are working with.

So 0 will be expressed as "00000," and 242 will be known as "22222," and all of the numbers in between will have five digits as well, all of being "0," "1," or "2. " Given all of this, our transforms can be seen in two rather different ways at once. On the one hand, we are transforming numbers between 0 and 242 (inclusive) into (usually) other numbers between 0 and 242 (also inclusive). On the other hand, we will also be transforming one pattern of the form, "XXXXX," into another pattern of the form, "XXXXX," where in each case all five "X's" can be anything from "0" to "2. " Sometimes we will think numerically first and then look at the "XXXXX" patterns. We will also insist that all our transforms be one-to-one.

The simplest really useful transform is simple subtraction from 242. Tunguska the ternary computer emulator. Trinary computer science, logic and hardware / Тrinary. Wiki archive. Trinary Computer Systems. History-of-Ternary-Computers.