The quater-imaginary numeral system was first proposed by Donald Knuth in 1955, in a submission to a high-school science talent search. It is a positional system which uses the imaginary number 2i as base. By analogy with the quaternary numeral system, it is able to represent every complex number using only the digits 0, 1, 2, and 3, without a sign.
Powers of 2i
Note that i−1 = −i.
<math>n<math> | <math>(2i)^n<math>
|
−8 | 1/256
|
−7 | 1/128 i
|
−6 | −1/64
|
−5 | −1/32 i
|
−4 | 1/16
|
−3 | 1/8 i
|
−2 | −1/4
|
−1 | −1/2 i
|
0 | 1
|
1 | 2i
|
2 | −4
|
3 | −8i
|
4 | 16
|
5 | 32i
|
6 | −64
|
7 | −128i
|
8 | 256
|
Decimal to quater-imaginary
Base 10 | Base 2i | Base 10 | Base 2i | Base 10 | Base 2i | Base 10 | Base 2i
|
1 | 1 | −1 | 103 | 1i | 10.2 | -1i | 0.2
|
2 | 2 | −2 | 102 | 2i | 10.0 | -2i | 1030.0
|
3 | 3 | −3 | 101 | 3i | 20.2 | -3i | 1030.2
|
4 | 10300 | −4 | 100 | 4i | 20.0 | -4i | 1020.0
|
5 | 10301 | −5 | 203 | 5i | 30.2 | -5i | 1020.2
|
6 | 10302 | −6 | 202 | 6i | 30.0 | -6i | 1010.0
|
7 | 10303 | −7 | 201 | 7i | 103000.2 | -7i | 1010.2
|
8 | 10200 | −8 | 200 | 8i | 103000.0 | -8i | 1000.0
|
9 | 10201 | −9 | 303 | 9i | 103010.2 | -9i | 1000.2
|
10 | 10202 | −10 | 302 | 10i | 103010.0 | -10i | 2030.0
|
11 | 10203 | −11 | 301 | 11i | 103020.2 | -11i | 2030.2
|
12 | 10100 | −12 | 300 | 12i | 103020.0 | -12i | 2020.0
|
13 | 10101 | −13 | 1030003 | 13i | 103030.2 | -13i | 2020.2
|
14 | 10102 | −14 | 1030002 | 14i | 103030.0 | -14i | 2010.0
|
15 | 10103 | −15 | 1030001 | 15i | 102000.2 | -15i | 2010.2
|
16 | 10000 | −16 | 1030000 | 16i | 102000.0 | -16i | 2000.0
|
Examples
- <math>5 = 16 + (3\cdot-4) + 1 = 10301_{2i}<math>
- <math>i = 2i + 2\left(-\frac{1}{2}i\right) = 10.2_{2i}<math>
- <math>11210.31_{2i} = 1(16) + 1(-8i) + 2(-4) + 1(2i) + 3\left(-\frac{1}{2}i\right) + 1\left(-\frac{1}{4}\right) = 7 \frac{3}{4} - 7 \frac{1}{2}i<math>
References
- D. Knuth. The Art of Computer Programming. Volume 2, 3rd Edition. Addison-Wesley. pp. 205, "Positional Number Systems"