Binary (Base 2) to Ternary (Base 3) Converter
Convert binary numbers to ternary.
11111111 (base 2) = 100110 (base 3)
Digits in base 2: 0 and 1. Digits in base 3: 0 to 2.
How to convert Binary to Ternary
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 2 the place values, from the right, are 20 = 1, 21 = 2, 22 = 4 and so on.
Most pairs have no direct trick, so go through decimal, the base we all calculate in. First turn the base 2 number into decimal, then divide by 3 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 2: 1, 2, 4, 8, 16, and so ondivide by 3, keep the remainder, repeat until the quotient is 0the answer is the remainders read from last to firstdigits in base 2: 0 and 1digits in base 3: 0 to 2
Worked example 1: 101101 from binary to ternary
Step 1: base 2 to decimal101101 (base 2) = 1 × 25 + 1 × 23 + 1 × 22 + 1 × 20= 32 + 8 + 4 + 1= 45Step 2: decimal to base 345 ÷ 3 = 15 remainder 015 ÷ 3 = 5 remainder 05 ÷ 3 = 1 remainder 21 ÷ 3 = 0 remainder 1Read the remainders from the bottom up: 1200101101 (base 2) = 1200 (base 3)
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: 11111111 from binary to ternary
Step 1: base 2 to decimal11111111 (base 2) = 1 × 27 + 1 × 26 + 1 × 25 + 1 × 24 + 1 × 23 + 1 × 22 + 1 × 21 + 1 × 20= 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1= 255Step 2: decimal to base 3255 ÷ 3 = 85 remainder 085 ÷ 3 = 28 remainder 128 ÷ 3 = 9 remainder 19 ÷ 3 = 3 remainder 03 ÷ 3 = 1 remainder 01 ÷ 3 = 0 remainder 1Read the remainders from the bottom up: 10011011111111 (base 2) = 100110 (base 3)
Worked example 3: 1111101000 from binary to ternary
Step 1: base 2 to decimal1111101000 (base 2) = 1 × 29 + 1 × 28 + 1 × 27 + 1 × 26 + 1 × 25 + 1 × 23= 512 + 256 + 128 + 64 + 32 + 8= 1,000Step 2: decimal to base 31,000 ÷ 3 = 333 remainder 1333 ÷ 3 = 111 remainder 0111 ÷ 3 = 37 remainder 037 ÷ 3 = 12 remainder 112 ÷ 3 = 4 remainder 04 ÷ 3 = 1 remainder 11 ÷ 3 = 0 remainder 1Read the remainders from the bottom up: 11010011111101000 (base 2) = 1101001 (base 3)
Need the other direction? Open the Ternary to Binary converter.
Binary to Ternary examples
The decimal number 255 is written 11111111 in binary and 100110 in ternary.
| Binary | Ternary | Decimal |
|---|---|---|
| 1 | 1 | 1 |
| 10 | 2 | 2 |
| 111 | 21 | 7 |
| 1000 | 22 | 8 |
| 1010 | 101 | 10 |
| 1111 | 120 | 15 |
| 10000 | 121 | 16 |
| 100000 | 1012 | 32 |
| 1000000 | 2101 | 64 |
| 1100100 | 10201 | 100 |
| 11111111 | 100110 | 255 |
| 1111101000 | 1101001 | 1000 |
Where Binary to Ternary comes up
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.
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.
Going to a larger base packs more value into each digit, so the result is shorter. The number 255 needs 8 digits in binary and 6 in ternary.
Binary to Ternary FAQ
How do I convert binary to ternary?
Convert to decimal first by adding up each digit times its place value, then divide that decimal number by 3 repeatedly and read the remainders from last to first.
Which digits does binary use?
Base 2 uses the digits 0 and 1. For example, 2 is not a valid digit in base 2.
Will the ternary number be longer or shorter?
Shorter. Going to a larger base packs more value into each digit, so the result is shorter. Roughly 0.63 ternary digits for every binary digit. The number 255 needs 8 digits in binary and 6 in ternary.
What is 11111111 in ternary?
11111111 in binary is 100110 in ternary. 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.