
the multiplication table is trivial. Addition and subtraction are essentially
the same operation: Just negate one number and then add. Negation itself is
also effortless: Change every N into a 1, and vice versa. Rounding is mere
truncation: Setting the least-significant trits to 0 automatically rounds to
the closest power of 3.</p>

<h3>Encoding</h3>
<p>Five trits can be stored in a byte by using modulo and division, this
technique can store 243 possible values in a byte:</p>
<pre>
(n % 3) + '0', n /= 3;
<