In computer science, in addition to the familiar decimal number system, there are various options for integer positional systems. One of these is the ternary.
What are the number systems
In ordinary life, people use the decimal number system, which includes numbers from 0 to 9. In computer science, it is customary to use a binary system that includes only 0 and 1. However, this does not interfere with other systems, such as the ternary, which consists of the numbers 0,1 and 2 It is less popular than the ones mentioned above, however, an understanding of how to translate into the ternary number system will be useful to students of computer science. The article provides simple translation examples.
How to translate to the ternary number system from decimal
. , ( - 3), . .
. , 10 15 . . , , .
, , 100. 3. : 100/3=33( 1)/3=11( 0)/3=3( 2)/3=1( 0). :10201. ( ). , , 22102, 20122.
? , . ( , 0, , ).
( - ), 3 , , . ( ), , . , .
, , 20122. 24 03 12 21 20. , : 2*34+1*32+2*31+2*30. (162+9+6+2). 179. , 0 . , .
, -. . , , .
. , . . , , .
. , . 3, , 1,236. ( 0 ). , 0,21022 .
, , . , , , .
. , .
, . , .
, . , . . (-;0+), (-1;0+1). , . , , . .
. A,B,C, , (A>B>C).
. , , . , .
, . .
. , , . ( ). , . , . , . , . .