Ternary numeral system

From Wikipedia, the free encyclopedia

(Redirected from Trit)
Jump to: navigation, search
Numeral systems by culture
Hindu-Arabic numerals
Western Arabic
Eastern Arabic
Khmer
Indian family
Brahmi
Thai
East Asian numerals
Chinese
Counting rods
Japanese
Korean 
Alphabetic numerals
Abjad
Armenian
Cyrillic
Ge'ez
Hebrew
Ionian/Greek
Sanskrit
 
Other systems
Attic
Babylonian
Egyptian
Etruscan
Mayan
Roman
Urnfield
List of numeral system topics
Positional systems by base
Decimal (10)
2, 4, 8, 16, 32, 64
3, 9, 12, 24, 30, 36, 60, more…
v  d  e

Ternary or trinary is the base-3 numeral system. Ternary digits are known as trits (trinary digit), with a name analogous to "bit". One trit contains about 1.58596 (log23) bit of information. Although ternary most often refers to a system in which the three digits, 0, 1, and 2, are all nonnegative integers, the adjective also lends its name to the balanced ternary system, used in comparison logic and ternary computers.

Contents

Representations of integer numbers in ternary do not get uncomfortably lengthy as quickly as in binary. For example, decimal 365 corresponds to binary 101101101 (9 digits) and to ternary 111112 (6 digits). However, they are still far less compact than the corresponding representations in bases such as decimal — see below for a compact way to codify ternary using nonary and septemvigesimal.

Numbers one to twenty-seven in standard ternary
Ternary 1 2 10 11 12 20 21 22 100
Binary 1 10 11 100 101 110 111 1000 1001
Decimal 1 2 3 4 5 6 7 8 9
Ternary 101 102 110 111 112 120 121 122 200
Binary 1010 1011 1100 1101 1110 1111 10000 10001 10010
Decimal 10 11 12 13 14 15 16 17 18
Ternary 201 202 210 211 212 220 221 222 1000
Binary 10011 10100 10101 10110 10111 11000 11001 11010 11011
Decimal 19 20 21 22 23 24 25 26 27
Powers of three in ternary
Ternary 1 10 100 1 000 10 000
Binary 1 11 1001 1 1011 101 0001
Decimal 1 3 9 27 81
Power 30 31 32 33 34
Ternary 100 000 1 000 000 10 000 000 100 000 000 1 000 000 000
Binary 1111 0011 10 1101 1001 1000 1000 1011 1 1001 1010 0001 100 1100 1110 0011
Decimal 243 729 2 187 6 561 19 683
Power 35 36 37 38 39

As for rational numbers, ternary offers a convenient way to represent one third (as opposed to its cumbersome representation as an infinite string of recurring digits in decimal); but a major drawback is that, in turn, ternary does not offer a finite representation for the most basic fraction: one half (and thus, neither for one quarter, one sixth, one eighth, one tenth, etc.), because 2 is not a prime factor of the base.

Fractions in ternary
Ternary 0.111111111111... 0.1 0.020202020202... 0.012101210121... 0.011111111111... 0.010212010212...
Binary 0.1 0.010101010101... 0.01 0.001100110011... 0.00101010101... 0.001001001001...
Decimal 0.5 0.333333333333... 0.25 0.2 0.166666666666... 0.142857142857...
Fraction 1/2 1/3 1/4 1/5 1/6 1/7
Ternary 0.010101010101... 0.01 0.002200220022... 0.002110021100... 0.002020202020... 0.002002002002...
Binary 0.001 0.000111000111... 0.000110011001... 0.000101110100... 0.000101010101... 0.000100111011...
Decimal 0.125 0.111111111111... 0.1 0.090909090909... 0.083333333333... 0.076923076923...
Fraction 1/8 1/9 1/10 1/11 1/12 1/13

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. Ternary also has a unit similar to a byte, the tryte, which is six ternary digits.

A base-three system is used in Islam to keep track of counting Tasbih to 99 or to 100 on a single hand for counting prayers (as alternative for the Misbaha). The benefit —apart from allowing a single hand to count up to 99 or to 100— is that counting doesn't distract the mind too much since the counter needs only to divide Tasbihs into groups of three.

A rare ternary point is used to denote fractional parts of an inning in baseball. Since each inning consists of 3 outs, each out is considered \begin{matrix} \frac{1}{3} \end{matrix} (one third) of an inning and is denoted as .1. For example, if a player pitched all of the 4th, 5th and 6th innings, plus 2 outs of the 7th inning, his Innings pitched column for that game would be listed as 3.2, meaning 3 \begin{matrix} \frac{2}{3} \end{matrix}. (In this usage, only the fractional part of the number is written in ternary form.)

Ternary numbers can be used to convey self-similar structures like a Sierpinski Triangle or a Cantor set conveniently.

Ternary encoding can also be applied in most Relational Databases, with NULL acting as the third trit. By manually encoding datatypes it is possible to effectively reduce the storage requirements by a third.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.