Ternary numeral system, how does it relate to binary issue

  • Context: Undergrad 
  • Thread starter Thread starter Ledgeknow
  • Start date Start date
  • Tags Tags
    Binary System
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 4K views
Ledgeknow
Messages
4
Reaction score
0
Ternary (sometimes called trinary) is the base-3 numeral system. Analogous to a bit, a ternary digit is a trit (trinary digit). One trit contains log(base 2) 3 (about 1.58496) bits of information.

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?
 
Physics news on Phys.org
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:
2n-1=3m-1

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

finally we wanted to know how many bits are equal to 1 trit, so we set m=1 and get:
log23=1.58496
 
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?
 
Ledgeknow said:
Source: http://en.wikipedia.org/wiki/Ternary_numeral_systemThe 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?

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:
MikeyW said:
If a trit requires 50% more space and stores 58% more information surely it's a more efficient storage method?
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.

daveyp225 said:
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.
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.
 
D H said:
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.

Gotcha, I should have realized something was wrong with such a big difference.