Library/Arithmetic/Number systems/Ternary number system

Ternary number system

Overview
Important

A number written in base 3 (ternary) uses only the digits 0, 1, and 2. Each digit represents a coefficient for a power of 3. The value of a ternary number anan1ldotsa1a0a_n a_{n-1} \\ldots a_1 a_0 is an×3n+an1×3n1++a1×31+a0×30a_n \times 3^n + a_{n-1} \times 3^{n-1} + \ldots + a_1 \times 3^1 + a_0 \times 3^0 where each aia_i is 0, 1, or 2.

Important properties

  • Only digits 0, 1, and 2 are used.

  • Each position represents a power of 3.

  • Conversion between ternary and decimal involves expanding in powers of 3.

  • Ternary numbers can represent any integer.