- Quater-imaginary base
The quater-imaginary
numeral system was first proposed byDonald Knuth in1955 , in a submission to a high-school science talent search. It is a non-standard positional numeral system which uses theimaginary number , 2"i", as its base. By analogy with thequaternary numeral system , it is able to represent everycomplex number using only the digits 0, 1, 2, and 3, without a sign.From quater-imaginary to decimal
To convert a digit string from the quater imaginary system to the decimal system, the standard formula for non-standard positional systems can be used. This says that a digit string d_3d_2d_1d_0 in the quater imaginary system can be converted to a decimal number using the formula::d_3cdot b^3+d_2cdot b^2+d_1cdot b+d_0.In this formula b = 2"i" for the quater-imaginary system.
Example
To convert the string 1101_{2i} to a decimal number, fill in the formula above::1cdot (2i)^3+1cdot (2i)^2+0cdot (2i)+1=-8i-4+0+1=-3-8i
The formula to calculate the decimal number from the quater-imaginary number can be extended when larger strings are used. So to find the decimal counterpart of 1030003_{2i} use the formula extended to 7 digits.:d_6cdot b^6+d_5cdot b^5+d_4cdot b^4+d_3cdot b^3+d_2cdot b^2+d_1cdot b+d_0So for 1030003_{2i} and with b = 2"i" this gives::1cdot (2i)^6+0+3cdot (2i)^4+0+0+0+3=-64+3cdot 16+3=-13.
Powers of 2"i"
When trying to find representations of the numbers from the quater-imaginary system to the decimal system, or vice-versa, the following table is useful:
{| class="wikitable" style="text-align:right"
-!Base 10!!Base 2"i"
-
−1"i"||0.2
-
−2"i"||1030.0
-
−3"i"||1030.2
-
−4"i"||1020.0
-
−5"i"||1020.2
-
−6"i"||1010.0
-
−7"i"||1010.2
-
−8"i"||1000.0
-
−9"i"||1000.2
-
−10"i"||2030.0
-
−11"i"||2030.2
-
−12"i"||2020.0
-
−13"i"||2020.2
-
−14"i"||2010.0
-
−15"i"||2010.2
-
−16"i"||2000.0Examples
Below are some other examples of conversions from decimal numbers to quater-imaginary numbers.
:5 = 16 + (3cdot-4) + 1 = 10301_{2i}
:i = 2i + 2left(-frac{1}{2}i ight) = 10.2_{2i}
:7 frac{3}{4} - 7 frac{1}{2}i = 1(16) + 1(-8i) + 2(-4) + 1(2i) + 3left(-frac{1}{2}i ight) + 1left(-frac{1}{4} ight) = 11210.31_{2i}
ee also
*
Complex base systems References
*D. Knuth. "The Art of Computer Programming". Volume 2, 3rd Edition. Addison-Wesley. pp. 205, "Positional Number Systems"
Wikimedia Foundation. 2010.