基底为3:三进制数

Interactive · 2 questions

Ternary

Ternary is a numeral system with base 3.3. This essentially means it only uses 33 digits to make up its numbers: 0, 1, 20,\,1,\,2

Our normal number system is called the decimal or base-10.10. As you may have guessed it is because we use 1010 digits. 0, 1, 2, 3, 4, 5, 6, 7, 8, 90,\,1,\,2,\,3,\,4,\,5,\,6,\,7,\,8,\,9

From Decimal to Ternary

To convert from a regular decimal number to a ternary number can be a little tedious, but it only requires division. Let's work through an example to see how we do it.

Suppose we want to convert 4242 from base-1010 to base-3.3. One way we show a number is base-1010 is to put a subscript after it with 10.10. 421042_{10}

To begin the conversion to base-33, we divide our number by 3.3. We don't need to worry about decimal points, just what the remainder is.

Let's divide 4242 by 3.3.

42/3 = 14 r0

We get 1414 with remainder 0.0. The remainder will be the digit in the "one's place" of our ternary number.

Next, take the number we get as our solution (minus the remainder) and divide that by 3.3. Let's divide 1414 by 3.3.

42/3 = 14 r0
14/3 = 4 r2

We get 44 remainder 2.2. This remainder will be the digit in the "ten's place" of our ternary number.

We again divide our result by 3.3. This will go till we get a result of 0.0. So let's divide 44 by 3.3.

42/3 = 14 r0
14/3 = 4 r2
4/3 = 1 r1

We get 11 remainder 1.1. This will be the digit in the "hundred's place" of our ternary number.

We're almost done! One more division. Divide 11 by 3.3.

42/3 = 14 r0
14/3 = 4 r2
4/3 = 1 r1
1/3 = 0 r1

We get another remainder of 1.1. This will be the digit in the "thousand's place" of our ternary number. We know to stop here because we finally get 00 up top.

So, we got the remainders 0, 2, 1, 10,\,2,\,1,\,1. The ternary version of 4242 will be these numbers but written in reverse order. So: 4210=1120342_{10}=1120_3

From Ternary to Decimal

Don't worry, this way is much simpler in my opinion. Let's use the number we just found, 11201120, and convert it back to 4242.

Starting with the last digit, 0,0, we want to multiply each digit by 33 raised to a power starting from 00 and then add them all together. In other words, 00 is multiplied by 303^{\color{red}{0}}, 22 is multiplied by 313^{\color{red}{1}}, 11 is multiplied by 323^{\color{red}{2}}, and 11 is multiplied by 333^{\color{red}{3}}. 1120=1⋅33+1⋅32+2⋅31+0⋅30=1⋅27+1⋅9+2⋅3+0⋅1=27+9+6+0=42\begin{align} &1120\\ &=1\cdot3^3+1\cdot3^2+2\cdot3^1+0\cdot3^0\\ &=1\cdot27+1\cdot9+2\cdot3+0\cdot1\\ &=27+9+6+0\\ &=42 \end{align}

Practice

Try converting each way on your own.

What is 1919 in base-3?

Choose one answer

Learn a clever approach

Every problem comes with a worked solution, so even one you cannot crack shows you a new way to think. These are real problems from the AMC 12 and AIME, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.

Interactive · 1 question

All your life you've been counting in what is called the base 1010 number system, where we build numbers using the digits 0,1,2,3,4,5,6,7,8,0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.9.

But it turns out we don't have to use all these digits. In particular, if we only use the first three, then we are writing numbers using a base 33 number system. It is important to know that we don't use the number 33 in this system, but only 0,1,0, 1, and 2.2. Also, "ternary" is just a fancy word for base-3.3. So, let's try counting in base 33 for a little while.

0,1,2...0, 1, 2...

The first three numbers are easy, but what's next? We can't use 3.3. To get an answer, remember that in base 10,10, we can write every number with an invisible 00 in front of it. That is, counting in base 1010 gives

00,01,02,03,04,05,06,07,08,09...00, 01, 02, 03, 04, 05, 06, 07, 08, 09...

We can actually do the same thing in base 3,3, so in base 33 we start counting as

00,01,02...00, 01, 02...

In base 3,3, the 11 still comes after 0.0. This makes us think we can keep counting in base 33 as

00,01,02,10,11,12,...00, 01, 02, 10, 11, 12, ...

and in fact that's exactly what we do. And we can do this as many times as we want, adding more digits as we go along:

00,01,02,10,11,12,20,21,22,100...00, 01, 02, 10, 11, 12, 20, 21, 22, \color{red}{100}\color{black}{...}

In base 3,3, what number comes after 122?122?

Choose one answer

Interactive · 2 questions

When we count we usually use the digits 0,1,2,3,4,5,6,7,8,0, 1, 2, 3, 4, 5, 6, 7, 8, and 99 to make numbers. Well, as it might surprise you, that's not the only way to do it. The way we normally do it is called base 1010 representation because we use 1010 different digits, but we can use more or less digits to count. One common example, sometimes used in computer operations, is the base 33 representation, which only uses the digits 0,0, 1,1, and 2.2.

We can count any number in base 33 that we could in base 10,10, and we usually use subscripts to indicate which base we're in. A base-1010 number will have a 10_{10} stuck to the end, while a base-33 number will have a 3_{3} stuck to the end. The reason for this is clear upon answering the next question.

Which of the following could possibly be numbers in base 33 OR base 10?10?

Choose all correct answers

Read · 1 min

Ternary (aka base-33) numbers have 22 properties:

  1. Each place numeral is in the set {0,1,2}.\{0, 1, 2\}.
  2. Each place value is (number x 3place3^{place}).

To get the base-1010 value add up the place values.

E.g. What is base-1010 equivalent to the base-33 number 2210?2210?

=(2×33)+(2×32)+(1×31)+(0×30)= (2 \times 3^{3}) + (2 \times 3^{2}) + (1 \times 3^{1}) + (0 \times 3^{0}) =(2×27)+(2×9)+(1×3)+(0×1)= (2 \times 27) + (2 \times 9) + (1 \times 3) + (0 \times 1) =54+18+3+0= 54 + 18 + 3 +0 =75= 75

Interactive · 1 question

Base 3

The base 3,3, or ternary, system, uses only the digits 0,1,0, 1, and 2.2. For each place, instead of multiplying by the power of 10,10, you multiply by the power of 3.3.

For example, 120123→1×34+2×33+0×32+1×31+212012_3\rightarrow 1\times3^4+2\times3^3+0\times3^2+1\times3^1+2.

What is 221032210_3 in base 10?10?

Choose one answer

Video

(Video) Number Systems 3: Ternary

by Jacob Schrum

Here's a good video by Jacob Schrum showing you how to convert from base-1010 to base-33 and from base-33 to base-1010.

Summary\large{\text{Summary}}

Base-33 is a number system that uses three numbers, 0,1,0, 1, and 2.2. All you do to convert the number into base-33 is to continuously divide by 33 and use the remainders each time to figure out the the new number.

Test Yourself: Convert the number 431043_{10} to base-3.3.

Choose one answer

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems