Quater-imaginary base

Quater-imaginary base

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 non-standard positional numeral system which uses the imaginary number, 2"i", as its 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.

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.0

Examples

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.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Complex base systems — In arithmetic, a complex base system is a positional numeral system whose radix is an imaginary (proposed by Donald Knuth in 1955[1][2]) or complex number (proposed by S. Khmelnik in 1964[3] and Walter F. Penney in 1965[4] …   Wikipedia

  • Negative base — Numeral systems by culture Hindu Arabic numerals Western Arabic Eastern Arabic Indian family Tamil Burmese Khmer Lao Mongolian Thai East Asian numerals Chinese Japanese Suzhou Korean Vietnamese …   Wikipedia

  • Donald Knuth — Donald Ervin Knuth Donald Knuth at a reception for the Open Content Alliance, October 25, 2005 Born …   Wikipedia

  • Non-standard positional numeral systems — Numeral systems by culture Hindu Arabic numerals Western Arabic (Hindu numerals) Eastern Arabic Indian family Tamil Burmese Khmer Lao Mongolian Thai East Asian numerals Chinese Japanese Suzhou Korean Vietnamese …   Wikipedia

  • Numeral system — This article is about different methods of expressing numbers with symbols. For classifying numbers in mathematics, see number system. For how numbers are expressed using words, see number names. Numeral systems by culture Hindu Arabic numerals… …   Wikipedia

  • List of numeral system topics — Numeral systems by culture Hindu Arabic numerals Western Arabic (Hindu numerals) Eastern Arabic Indian family Tamil Burmese Khmer Lao Mongolian Thai East Asian numerals Chinese Japanese Suzhou Korean Vietnamese …   Wikipedia

  • Metafont — Developer(s) Donald Knuth Stable release 2.718281 / March 2008 Operating syste …   Wikipedia

  • CWEB — is a computer programming system created by Donald Knuth and Silvio Levy as a follow up to Knuth s WEB literate programming system, using the C programming language (and to a lesser extent the C++ and Java programming languages) instead of Pascal …   Wikipedia

  • Knuth–Morris–Pratt algorithm — The Knuth–Morris–Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a word W within a main text string S by employing the observation that when a mismatch occurs, the word itself embodies sufficient information to… …   Wikipedia

  • Computers and Typesetting — is a 5 volume set of books by Donald Knuth published 1986 describing the TeX and Metafont systems for digital typography. Knuth s computers and typesetting project was the result of his frustration with the lack of decent software for the… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”