Apparently you can't convert base2 to base3 without an intermediary

I assume this is relevant to the ongoing quest to fully understand ternary logic, its strengths and limitations, but do not yet know what to do with it. So here it is:

You can't convert a base2 number to a base3 number without loading it into an integer. The reason is that 2 and 3 are coprime - they have no common factors. If you were working with base2 and base4, or even base6 and base9, then the set of integers up to the lowest common multiple of the two bases would be represented by two isomorphic sets. For example 13 (base4) = 0111 (base2), so converting 1313 (base4) = 01110111 (base2) - it's a find and replace operation.

Also of note is that the conversion from binary to ternary takes more effort. Makes sense, but just being precise here.

From: https://stackoverflow.com/questions/3400420/binary-to-ternary-representation-convertion

 

Add a comment

HTML code is displayed as text and web addresses are automatically converted.

Page top