Hubbry Logo
search
logo

Ternary numeral system

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Ternary numeral system

A ternary /ˈtɜːrnəri/ numeral system (also called base 3 or trinary) has three as its base. Analogous to a bit, a ternary digit is a trit (trinary digit). One trit is equivalent to log2 3 (about 1.58496) bits of information.

Although ternary most often refers to a system in which the three digits are all non–negative numbers; specifically 0, 1, and 2, the adjective also lends its name to the balanced ternary system; comprising the digits −1, 0 and +1, used in comparison logic and ternary computers.

Representations of integer numbers in ternary do not get uncomfortably lengthy as quickly as in binary. For example, decimal 365(10) or senary 1405(6) corresponds to binary 101101101(2) (nine bits) and to ternary 111112(3) (six 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 (base 9) and septemvigesimal (base 27).

As for rational numbers, ternary offers a convenient way to represent 1/3 as same as senary (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 1/2 (nor for 1/4, 1/8, etc.), because 2 is not a prime factor of the base; as with base two, one-tenth (decimal1/10, senary 1/14) is not representable exactly (that would need e.g. decimal); nor is one-sixth (senary 1/10, decimal 1/6).

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 maximal digit value b − 1, we can write:

Then

For a three-digit ternary number, N(3, 3) = 33 − 1 = 26 = 2 × 32 + 2 × 31 + 2 × 30 = 18 + 6 + 2.

See all
User Avatar
No comments yet.