Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ternary numeral system, how does it relate to binary issue

  1. Aug 10, 2011 #1
    Source: http://en.wikipedia.org/wiki/Ternary_numeral_system

    The last sentence in the quote from the Wikipedia has recently intrigued me. I understand that the logarithm function returns a value which when used as an exponent to the base n gives the original input value.

    Can someone elaborate on the last sentence with a little bit more verbalization of why the log function was used to derive how many bits of information there is in a trit. What does it mean 1.58496 bits?
  2. jcsd
  3. Aug 10, 2011 #2
    1 bit of information can be either a 0 or a 1

    1 bit of information can represent: 0,1
    2 bits of information can represent: 0,1,2,3
    3 bits of information can represent: 0,1,2,3,4,5,6,7
    n bits of information can represent: 0,...,2n-1

    1 trit of information can be a 0, 1, or 2 so

    1 trit of information can represent: 0,1,2
    2 trits of information can represent: 0,1,2,3,4,5,6,7,8
    m trits of information can represent: 0,...,3m-1

    n bits of information is the same amount of information as m trits when:

    or rearranging for n shows us how many n bits of information are equivilent to m trits:

    finally we wanted to know how many bits are equal to 1 trit, so we set m=1 and get:
  4. Aug 10, 2011 #3
    Sounded like that answered the question perfectly, if nobody minds I have a similar question...

    If a trit requires 50% more space and stores 58% more information surely it's a more efficient storage method?
  5. Aug 10, 2011 #4
    In binary, n bits is meant a string of n 0's and 1's. I'm guessing m trits seems to mean a strong of m 0's 1's or 2's. Per every m trits, its is stating there are 1.58m bits.

    The "units of information" article, it explains why. To be able to store n possible states in binary, you need log_2(n) bits. Hence if you know your program will need to store a number up to 65, you'll need CEIL(log_2(65)) = 7 bits of information (1000001b = 65d). You will only need 3 trits (3^4d = 81d and 65d = 212t). That 1.58... proportion is log_2(3). All it is saying is that using m trits will store 58% more bits on average than m bits. In this example, its clearly much more than 1.58.
    Last edited: Aug 10, 2011
  6. Aug 10, 2011 #5

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    I don't quite know what you mean by "50% more space". As far as base 3 being a more efficient storage method, the answer is almost certainly no. Physicists and electrical engineers have come up with a slew of mechanisms that have two stable states. It's easy. Mechanisms with three stable states tend to be far more complex. Your computer uses binary at its heart, as does practically every digital computer ever made. There's a reason for that.

    6510 is not 212. It is 21023: 2*27+1*9+0*3+2*1. (2123 is 2310.) The ratio of the number of bits to the number of trits needed to represent 65 is 1.75, so not a whole lot more than 1.585.

    For any given non-negative integer, the ratio of the number of bits needed to represent that number to the number of trits needed to represent that number is always between 1 and 2. The extrema are hit at 0, 1, 2, 3, and 8. For all other numbers, the ratio lies between 1 and 2, exclusive of the end points.
  7. Aug 10, 2011 #6
    Gotcha, I should have realized something was wrong with such a big difference.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook