Ternary (Base 3) to Binary (Base 2) Converter

Convert ternary numbers to binary.

11111111

100110 (base 3) = 11111111 (base 2)

Digits in base 3: 0 to 2. Digits in base 2: 0 and 1.

How to convert Ternary to Binary

Every positional number system works the same way: a digit is worth its own value times the base raised to the power of its position. In base 3 the place values, from the right, are 30 = 1, 31 = 3, 32 = 9 and so on.

Most pairs have no direct trick, so go through decimal, the base we all calculate in. First turn the base 3 number into decimal, then divide by 2 and read the remainders from the bottom up. Two short steps, and you can check the number in the middle.

The method

decimal value = each digit × its place value, all added upplace values in base 3: 1, 3, 9, 27, 81, and so ondivide by 2, keep the remainder, repeat until the quotient is 0the answer is the remainders read from last to firstdigits in base 3: 0 to 2digits in base 2: 0 and 1

Worked example 1: 1200 from ternary to binary

Step 1: base 3 to decimal1200 (base 3) = 1 × 33 + 2 × 32= 27 + 18= 45Step 2: decimal to base 245 ÷ 2 = 22 remainder 122 ÷ 2 = 11 remainder 011 ÷ 2 = 5 remainder 15 ÷ 2 = 2 remainder 12 ÷ 2 = 1 remainder 01 ÷ 2 = 0 remainder 1Read the remainders from the bottom up: 1011011200 (base 3) = 101101 (base 2)

Remainders come out last digit first, which is why you read them from the bottom up. Digits that are 0 add nothing to the sum, so they are left out of the expansion.

Worked example 2: 100110 from ternary to binary

Step 1: base 3 to decimal100110 (base 3) = 1 × 35 + 1 × 32 + 1 × 31= 243 + 9 + 3= 255Step 2: decimal to base 2255 ÷ 2 = 127 remainder 1127 ÷ 2 = 63 remainder 163 ÷ 2 = 31 remainder 131 ÷ 2 = 15 remainder 115 ÷ 2 = 7 remainder 17 ÷ 2 = 3 remainder 13 ÷ 2 = 1 remainder 11 ÷ 2 = 0 remainder 1Read the remainders from the bottom up: 11111111100110 (base 3) = 11111111 (base 2)

Worked example 3: 1101001 from ternary to binary

Step 1: base 3 to decimal1101001 (base 3) = 1 × 36 + 1 × 35 + 1 × 33 + 1 × 30= 729 + 243 + 27 + 1= 1,000Step 2: decimal to base 21,000 ÷ 2 = 500 remainder 0500 ÷ 2 = 250 remainder 0250 ÷ 2 = 125 remainder 0125 ÷ 2 = 62 remainder 162 ÷ 2 = 31 remainder 031 ÷ 2 = 15 remainder 115 ÷ 2 = 7 remainder 17 ÷ 2 = 3 remainder 13 ÷ 2 = 1 remainder 11 ÷ 2 = 0 remainder 1Read the remainders from the bottom up: 11111010001101001 (base 3) = 1111101000 (base 2)

Need the other direction? Open the Binary to Ternary converter.

Ternary to Binary examples

The decimal number 255 is written 100110 in ternary and 11111111 in binary.

Common Ternary to Binary values
TernaryBinaryDecimal
111
2102
211117
2210008
101101010
120111115
1211000016
101210000032
2101100000064
102011100100100
10011011111111255
110100111111010001000

Where Ternary to Binary comes up

Ternary uses the digits 0, 1 and 2, and each ternary digit (a trit) carries about 1.58 bits of information. Ternary is rare in real hardware, though the Soviet Setun computer of 1958 used a balanced ternary design. Today it shows up mostly in computer science courses and puzzles.

Binary uses only 0 and 1, because a digital circuit has two stable states: off and on. Every number a computer stores is binary underneath. You meet it when you work with bit flags, bit masks, subnet masks and low-level debugging.

Going to a smaller base spreads the same value over more digits, so the result is longer. The number 255 needs 6 digits in ternary and 8 in binary.

Ternary to Binary FAQ

How do I convert ternary to binary?

Convert to decimal first by adding up each digit times its place value, then divide that decimal number by 2 repeatedly and read the remainders from last to first.

Which digits does ternary use?

Base 3 uses the digits 0 to 2. For example, 3 is not a valid digit in base 3.

Will the binary number be longer or shorter?

Longer. Going to a smaller base spreads the same value over more digits, so the result is longer. Roughly 1.58 binary digits for every ternary digit. The number 255 needs 6 digits in ternary and 8 in binary.

What is 100110 in binary?

100110 in ternary is 11111111 in binary. Both are the decimal number 255.

Can I convert negative numbers or fractions?

The converter handles whole numbers, and a leading minus sign works for negatives. Fractions use a different method, where you repeatedly multiply the fractional part by the new base, and they are not supported here.