352/9 = 39-1/9
= 27 + 9 + 3 + 1/9
= 1*3^3 + 1*3^2 + 1*3^1 + 0*3^0 + 0*3^(-1) + 1*3^(-2)
= 1110.01_3

Another example, where -1 comes into play:
Using ordinary ternary {0,1,2} representation:
100 = 1*3^4 + 0*3^3 + 2*3^2 + 0*3^1 + 1*3^0
= 10201_3{0,1,2}

Now transform into the {0,1,-1} representation by replacing 2 with -1
and adding 1 to the place digit to the left, propagating a carry if
necessary. I.e., if as you add 1 to the digit to the left it becomes
2, then you repeat the transformation on that digit as well. I'll
write 1 bar as X.

= 11X01_3{0,1,-1}

Dave

On Aug 30, 6:46 pm, Raj N <rajn...@gmail.com> wrote:
> In ternary number representation, numbers are represented as 0,1,-1.
> (Here -1 is represented as 1 bar.) How is 352/9 represented in ternary
> number representation?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to