![]() |
![]() |
|
![]() |
![]() |
Encyclopedia :
T :
TE :
TER :
Ternary |
|
|
TernaryTernary is the base numeral system. Ternary digitss are known as trits (trinary digit), analogous to bit. This system is also known as trinary.Although ternary most often refers to a system in which the three numerals, , and , are all positive integers, the adjective also lends its name to the balanced ternary system, useful for comparison logic.
Base 3Compared to analogCompared to base 10 and 2 /* Compared to base e */ Base 9 and 27
Unbalanced ternary can be converted to balanced ternary notation by adding 1111.. with carry, then subtracting 1111... without borrow. For example, 0213 + 1113 = 2023, 2023 - 1113 = 1113(bal) = 710. Balanced ternary is easily represented as electronic signals, as potential can either be negative, neutral, or positive. Utilizing a third state encompasses more data per digit; linearly approximately log(3)/log(2)=~1.589 bits per trit. Balanced ternary has other applications. For example, a classical "2-pan" 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 will be balanced perfectly with a 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. This is an optimal solution in terms of the number of weights needed to weigh any object. 60 = 11110 Similarily, a currency system using balanced ternary would save visits to the bank - customers would be likely to have exact change, or be able to get a small number of coins in change, and sellers would just occasionally need to deposit a large coin or two. The system works by representing positive values as coins the customer gives the merchant, and negative values as coins the merchant gives the customer. For example, if a merchant sells an item for five zorkmids, the customer would give the merchant a nine-zorkmid coin, and the merchant would give the customer a three-zorkmid coin and a one-zorkmid coin. Compact ternary representationTernary is inefficient for human usage, just as binary is. Therefore, nonary (base 9, each digit is two base-3 digits) or base 27 (each digit is 3 base-3 digits) is often used, similar to how octal and hexadecimal systems are used in place of binary. Ternary also has the equivalent of a byte, called a tryte. Other resourcesSee alsoExternal links
|
|
|
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License. |
|
| © 2008 Chamas Enterprises Inc. |