It Terns Out
Not all computers store values in binary, otherwise known as base-2. Some actually store values in ternary, otherwise known as base-3, it terns (er, turns) out! Rather than use 0, 1, and 2 as their digits, as you might expect, though, those ternary computers tend to use -1, 0, and +1, otherwise known as "balanced" ternary, ordinarily written more succinctly as −
, 0
, and +
, respectively.
Just as the digits in a binary number, otherwise known as bits, represent multiples of powers of 2, so do the digits in a ternary number, otherwise known as trits, represent multiples of powers of 3. In ternary, the rightmost trit can be said to be in the 1s place (i.e., 30); the second-from-right trit can be said to be in the 3s place (i.e., 31); the third-from-right trit can be said to be in the 9s place (i.e., 32); and so forth.
And so a ternary computer would represent, say, -8 through 8, in decimal, as follows in balanced ternary.
decimal | balanced ternary | because |
---|---|---|
-8 |
|
|
-7 |
|
|
-6 |
|
|
-5 |
|
|
-4 |
|
|
-3 |
|
|
-2 |
|
|
-1 |
|
|
0 |
|
|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
Answer the below in ternary.md
.
Questions
-
(1 point.) How many bits are required to represent, in binary, the decimal number we know as 8, assuming you don’t need to be able to represent negative numbers as well?
-
(1 point.) How many trits are required to represent, in balanced ternary, the decimal number we know as 8?
-
(1 point.) How many distinct values can you represent in binary with 2 bits?
-
(1 point.) How many distinct values can you represent in balanced ternary with 3 trits?
-
(1 point.) What is the largest (i.e., most positive) value, in decimal, that you can represent in balanced ternary with 3 trits?
-
(1 point.) What is the smallest (i.e., most negative) value, in decimal, that you can represent in balanced ternary with 3 trits?
-
(1 point.) How would a ternary computer represent, in balanced ternary, the decimal number we know as 50?
-
(2 points.) If the only physical input to a ternary computer is electricity, how might each of
-
,0
, and+
actually be stored electronically?
Debrief
-
Which resources, if any, did you find helpful in answering this problem’s questions?
-
About how long, in minutes, did you spend on this problem’s questions?