Example: Compute
In order to compute this, we can convert both numbers to the decimal system, add them together and convert back to ternary (base
Odometer Principle
Let the base be given by the natural number
- If the digit we are consider is not
, then replace it by the next digit in order, and terminate the algorithm.
- If we are consider a blank space (to the left of all the digits), then write in it the digit 1, and terminate the algorithm.
- If neither of the above holds, we are considering the digit
. Replace it with the digit
, move one place left, and return to step 1.
Exercise: Compute
.
Example: Compute
In this problem, we have to regroup just like in normal subtraction. Let’s recall the base
Now, let’s look at this in base
Exercise: Compute
.
Related Topics: Representing Numbers in Different Bases