Files
numnum/theory/ternary.en.html
T
2026-07-18 01:04:17 +03:00

12 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<h3>Balanced Ternary: Base 3 with signed digits</h3>
<p>Balanced ternary is a positional Base 3 system where non-zero digits are signed: 1, 0, or +1. Instead of using the digits -1 and +1, any suitable symbols can be used, we use circled - and +:</p>
<h3>Digits</h3>
<div class="theory-example">⊖ = 1, 0 = 0, ⊕ = +1</div>
<p>⊖ (Circled Minus) represents 1, and ⊕ (Circled Plus) represents +1.</p>
<h3>How it works</h3>
<p>Each position represents a power of 3, but positions can be negative:</p>
<div class="theory-example">⊕0⊖ = (+1)×9 + 0×3 + (1)×1 = 8</div>
<div class="theory-example">⊖⊕0 = (-1)×9 + (+1)×3 + 0×1 = -6</div>
<h3>Properties</h3>
<p>Balanced ternary has the unique property that the sign of a number can be determined from its most significant non-zero digit, eliminating the need for a separate sign. For negative numbers, the signs of all non-zero digits are flipped (⊕ ↔ ⊖). The system was studied by Leonardo Pisano (Fibonacci, 11701250) in connection with the weight problem — using weights of powers of 3, any integer mass from 1 can be measured with the fewest weights. In 1958, the Soviet engineer Nikolai Brusentsov built the Setun computer at Moscow State University, which used balanced ternary arithmetic and became one of the most elegant ternary computers.</p>