User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
0 / 10,000
Presets:
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Radix conversion between base-2 and base-3 is a non-trivial operation because 3 is not a power of 2. You cannot simply regroup digits. Each conversion requires full positional arithmetic: the source string must be evaluated as N = kโˆ‘i=0 di โ‹… bi, then decomposed by repeated division in the target base. A single misread bit in binary propagates unpredictably through every ternary digit. This tool uses native BigInt arithmetic to handle inputs of thousands of digits without the precision ceiling of IEEE 754 double-precision floats, which silently corrupt integers beyond 253. It approximates nothing. Every digit is exact.

binary to ternary base 2 to base 3 number base converter radix conversion ternary to binary numeral system converter

Formulas

A number N represented in base b1 as digits dkdkโˆ’1โ€ฆd1d0 has the decimal value:

N = kโˆ‘i=0 di ร— b1i

To convert N into base b2, perform repeated Euclidean division:

N = b2 ร— q + r, 0 โ‰ค r < b2

The remainders r, read in reverse order of computation, form the digits in base b2. For binary (b1 = 2) to ternary (b2 = 3), the intermediate value N is computed via Horner's method to avoid explicit exponentiation:

N = dk ร— 2k + โ€ฆ + d1 ร— 2 + d0

Where di โˆˆ {0, 1} for binary and r โˆˆ {0, 1, 2} for ternary output. The digit count in the target base is floor(logb2(N)) + 1. This tool uses BigInt internally, so precision is unlimited.

Reference Data

DecimalBinary (Base-2)Ternary (Base-3)Octal (Base-8)Hex (Base-16)
00000
11111
210222
3111033
41001144
51011255
61102066
71112177
8100022108
91001100119
10101010112A
15111112017F
16100001212010
20101002022414
27110111000331B
3210000010124020
421010101120522A
641000000210110040
8110100011000012151
10011001001020114464
128100000001120220080
24311110011100000363F3
25511111111100110377FF
256100000000100111400100
51210000000002002221000200
7291011011001100000013312D9
10001111101000110100117503E8
10241000000000011020112000400

Frequently Asked Questions

Binary to octal works by grouping 3 binary digits because 8 = 2ยณ. Ternary's base (3) is not a power of 2, so no fixed-width grouping exists. Every binary digit influences every ternary digit through carry propagation. Full positional evaluation is required.
The converter accepts up to 10,000 digits. It uses JavaScript's native BigInt type, which handles arbitrary-precision integers. A 10,000-bit binary number is approximately 3,010 decimal digits - well within BigInt's capability on modern browsers.
The ratio of digit counts is log(2)/log(3) โ‰ˆ 0.6309. A 100-digit binary number produces roughly 63 ternary digits. Conversely, a 100-digit ternary number requires approximately 159 binary digits. The ternary representation is always shorter.
Leading zeros are stripped during conversion. The input "00101" is treated identically to "101". The output never contains leading zeros unless the value is zero itself, which is represented as a single "0".
Ternary appears in balanced ternary computing (Soviet Setun computer, 1958), in information-theoretic optimal radix analysis (e โ‰ˆ 2.718, closest integer is 3), in redundant number systems for fast carry-free addition, and in some error-correcting codes. It is also used in combinatorial puzzles like the balance scale problem.
The converter validates every character against the expected alphabet: only "0" and "1" for binary mode, or "0", "1", and "2" for ternary mode. Any invalid character triggers an immediate error notification, and no conversion is attempted.