نظام عد ثلاثي
أنظمة ترقيم حسب الثقافة | |
---|---|
ترقيم هندي عربي | |
نظام ترقيم غربي عربي شرقي Khmer |
عائلة هندية براهمني تايلندي |
ترقيم غربي آسيا | |
صيني Suzhou |
Counting rods منغولي |
ترقيم أبجدي | |
أبجدي أرمني سريالي Ge'ez |
عبري اغريق (Ionian) |
أنظمة أخرى | |
Attic بابلي مصري |
Etruscan مايا Roman Urnfield |
List of numeral system topics | |
Positional systems by base | |
نظام عشري (10) | |
2, 4, 8, 16, 32, 64 | |
1, 3, 6, 9, 12, 20, 24, 30, 36, 60, more… | |
نظام العد الثلاثي (بالإنجليزية: Ternary numeral system) هونظام عد ذورقم أساس 3، ويسمى هذا النظام عد ثلاثي فالرقم ثلاثة أو-3 في النظام العشري فما فوق يساوي في النظام الثلاثيعشرة أو-10 أما أربعة فيساوي 11 أماستة فيساوي 20 إلى غير ذلك.
Comparison to other bases
× | 1 | 2 | 10 | 11 | 12 | 20 | 21 | 22 | 100 |
1 | 1 | 2 | 10 | 11 | 12 | 20 | 21 | 22 | 100 |
2 | 2 | 11 | 20 | 22 | 101 | 110 | 112 | 121 | 200 |
10 | 10 | 20 | 100 | 110 | 120 | 200 | 210 | 220 | 1000 |
11 | 11 | 22 | 110 | 121 | 202 | 220 | 1001 | 1012 | 1100 |
12 | 12 | 101 | 120 | 202 | 221 | 1010 | 1022 | 1111 | 1200 |
20 | 20 | 110 | 200 | 220 | 1010 | 1100 | 1120 | 1210 | 2000 |
21 | 21 | 112 | 210 | 1001 | 1022 | 1120 | 1211 | 2002 | 2100 |
22 | 22 | 121 | 220 | 1012 | 1111 | 1210 | 2002 | 2101 | 2200 |
100 | 100 | 200 | 1000 | 1100 | 1200 | 2000 | 2100 | 2200 | 10000 |
Representations of integer numbers in ternary do not get uncomfortably lengthy as quickly as in binary. For example, decimal 365 corresponds to binary 101101101 (nine digits) and to ternary 111112 (six digits). However, they are still far less compact than the corresponding representations in bases such as decimal – see below for a compact way to codify ternary using nonary and septemvigesimal.
Ternary | 1 | 2 | 10 | 11 | 12 | 20 | 21 | 22 | 100 |
---|---|---|---|---|---|---|---|---|---|
Binary | 1 | 10 | 11 | 100 | 101 | 110 | 111 | 1000 | 1001 |
Decimal | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Ternary | 101 | 102 | 110 | 111 | 112 | 120 | 121 | 122 | 200 |
Binary | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 | 10000 | 10001 | 10010 |
Decimal | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Ternary | 201 | 202 | 210 | 211 | 212 | 220 | 221 | 222 | 1000 |
Binary | 10011 | 10100 | 10101 | 10110 | 10111 | 11000 | 11001 | 11010 | 11011 |
Decimal | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
Ternary | 1 | 10 | 100 | 1000 | 10000 |
---|---|---|---|---|---|
Binary | 1 | 11 | 1001 | 11011 | 1010001 |
Decimal | 1 | 3 | 9 | 27 | 81 |
Power | 3⁰ | 3¹ | 3² | 3³ | 3⁴ |
Ternary | 100000 | 1000000 | 10000000 | 100000000 | 1000000000 |
Binary | 11110011 | 1011011001 | 100010001011 | 1100110100001 | 100110011100011 |
Decimal | 243 | 729 | 2187 | 6561 | 19683 |
Power | 3⁵ | 3⁶ | 3⁷ | 3⁸ | 3⁹ |
As for rational numbers, ternary offers a convenient way to represent 1÷3 (as opposed to its cumbersome representation as an infinite string of recurring digits in decimal); but a major drawback is that, in turn, ternary does not offer a finite representation for 1÷2 (neither for 1÷4, 1÷8, etc.), because 2 is not a prime factor of the base; as with base 2, 1÷10 is not representable exactly (that would need e.g. base 10); nor is 1÷6.
Fraction | 1/2 | 1/3 | 1/4 | 1/5 | 1/6 | 1/7 | 1/8 | 1/9 | 1/10 | 1/11 | 1/12 | 1/13 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Ternary | 0.1 | 0.1 | 0.02 | 0.0121 | 0.01 | 0.010212 | 0.01 | 0.01 | 0.0022 | 0.00211 | 0.002 | 0.002 |
Binary | 0.1 | 0.01 | 0.01 | 0.0011 | 0.001 | 0.001 | 0.001 | 0.000111 | 0.00011 | 0.0001011101 | 0.0001 | 0.000100111011 |
Decimal | 0.5 | 0.3 | 0.25 | 0.2 | 0.16 | 0.142857 | 0.125 | 0.1 | 0.1 | 0.09 | 0.083 | 0.076923 |
Sum of the digits in ternary as opposed to binary
The value of a binary number with n bits that are all 1 is 2ⁿ - 1.
Similarly, for a number N(b, d) with base b and d digits, all of which are the maximal digit value b - 1, we can write:
- N(b, d) = (b - 1) bᵈ⁻¹ + (b - 1) bᵈ⁻² + … + (b - 1) b¹ + (b - 1) b⁰
,
- N(b, d) = (b - 1) (bᵈ⁻¹ + bᵈ⁻² + … + b¹ + 1),
- N(b, d) = (b - 1) M.
- bM = bᵈ + bᵈ⁻¹ + … + b² + b¹, and
- -M = -bᵈ⁻¹ - bᵈ⁻² - … - b¹ - 1, so
- bM - M = bᵈ - 1, or
- M = (bᵈ - 1)÷(b - 1).
Then
- N(b, d) = (b - 1)M,
- N(b, d) = (b - 1) (bᵈ - 1)÷(b - 1), and
- N(b, d) = bᵈ - 1.
For a three-digit ternary number, N(3, 3) = 3³ - 1 = 26 = 2 × 3² + 2 × 3¹ + 2 × 3⁰ = 18 +ستة + 2.
Compact ternary representation: baseتسعة and 27
Nonary (base 9, each digit is two ternary digits) or septemvigesimal (base 27, each digit is three ternary digits) can be used for compact representation of ternary, similar to how octal and hexadecimal systems are used in place of binary.
انظر أيضاً
- نظام عد ثنائي
مراجع
- ^ Binary Coded Ternary and its Inverse, June 2016.
- ^ Impagliazzo, John; Proydakov, Eduard (2011-09-06). (in الإنجليزية). Springer. ISBN .
-
^ Brousentsov, N. P.; Maslov, S. P.; Ramil Alvarez, J.; Zhogolev, E.A. "Development of ternary computers at Moscow State University". Retrieved 20 January 2010. Unknown parameter
|تاريخ الأرشيف=
ignored (help); Unknown parameter|مسار الأرشيف=
ignored (help)
وصلات خارجية
- Ternary Arithmetic
- The ternary calculating machine of Thomas Fowler
- Ternary Base Conversion – includes fractional part, from Maths Is Fun
- Gideon Frieder's replacement ternary numeral system
- Visualization of numeral systems