This site is supported by donations to The OEIS Foundation.

# Quater-imaginary base

(Redirected from Quarter-imaginary base)

The quater-imaginary numeral system (with radix ${\displaystyle \scriptstyle {\sqrt {-4}}\,=\,2i\,}$ and digits from the set ${\displaystyle \scriptstyle \{0,\,1,\,2,\,3\}\,}$) allows the representation, in a unique way, of any complex number, no negative sign or imaginary ${\displaystyle \scriptstyle i\,}$ being required.

It is like the negabinary (base –2) or negaquartal (base –4) numeral systems, but using the powers of ${\displaystyle \scriptstyle 2i\,}$. Those powers, from ${\displaystyle \scriptstyle (2i)^{+7}\,}$ down to ${\displaystyle \scriptstyle (2i)^{-7}\,}$, are

${\displaystyle -128i,-64,32i,16,-8i,-4,2i,1,-{\frac {i}{2}},-{\frac {1}{4}},{\frac {i}{8}},{\frac {1}{16}},-{\frac {i}{32}},-{\frac {1}{64}},{\frac {i}{128}}\,}$

Since we have the even powers of ${\displaystyle \scriptstyle 2i\,}$ to represent the real part and the odd powers of ${\displaystyle \scriptstyle 2i\,}$ to represent the imaginary part, this numeral system thus requires the digits 0, 1, 2, and 3.

 ${\displaystyle \scriptstyle (2i)^{-3}\,=\,{\frac {i}{8}}\,}$ (used with digit ${\displaystyle \scriptstyle d_{-2}\,}$ of negaquartal (base –4) representation of real part of ${\displaystyle \scriptstyle 2i(a+bi)\,=\,-2b+2ai\,}$) ${\displaystyle \scriptstyle (2i)^{-2}\,=\,-{\frac {1}{4}}\,}$ (used with digit ${\displaystyle \scriptstyle d_{-1}\,}$ of negaquartal (base –4) representation of real part of ${\displaystyle \scriptstyle a+bi\,}$) ${\displaystyle \scriptstyle (2i)^{-1}\,=\,-{\frac {i}{2}}\,}$ (used with digit ${\displaystyle \scriptstyle d_{-1}\,}$ of negaquartal (base –4) representation of real part of ${\displaystyle \scriptstyle 2i(a+bi)\,=\,-2b+2ai\,}$) ${\displaystyle \scriptstyle (2i)^{0}\,=\,1\,}$ (used with digit ${\displaystyle \scriptstyle d_{0}\,}$ of negaquartal (base –4) representation of real part of ${\displaystyle \scriptstyle a+bi\,}$) ${\displaystyle \scriptstyle (2i)^{1}\,=\,2i\,}$ (used with digit ${\displaystyle \scriptstyle d_{0}\,}$ of negaquartal (base –4) representation of real part of ${\displaystyle \scriptstyle 2i(a+bi)\,=\,-2b+2ai\,}$) ${\displaystyle \scriptstyle (2i)^{2}\,=\,-4\,}$ (used with digit ${\displaystyle \scriptstyle d_{1}\,}$ of negaquartal (base –4) representation of real part of ${\displaystyle \scriptstyle a+bi\,}$) ${\displaystyle \scriptstyle (2i)^{3}\,=\,-8i\,}$ (used with digit ${\displaystyle \scriptstyle d_{1}\,}$ of negaquartal (base –4) representation of real part of ${\displaystyle \scriptstyle 2i(a+bi)\,=\,-2b+2ai\,}$)

For example, the quater-imaginary representation of 201 is

 ${\displaystyle \scriptstyle (2i)^{8}\,}$ ${\displaystyle \scriptstyle (2i)^{7}\,}$ ${\displaystyle \scriptstyle (2i)^{6}\,}$ ${\displaystyle \scriptstyle (2i)^{5}\,}$ ${\displaystyle \scriptstyle (2i)^{4}\,}$ ${\displaystyle \scriptstyle (2i)^{3}\,}$ ${\displaystyle \scriptstyle (2i)^{2}\,}$ ${\displaystyle \scriptstyle (2i)^{1}\,}$ ${\displaystyle \scriptstyle (2i)^{0}\,}$ ${\displaystyle \scriptstyle 256\,}$s ${\displaystyle \scriptstyle -128i\,}$s ${\displaystyle \scriptstyle -64\,}$s ${\displaystyle \scriptstyle 32i\,}$s ${\displaystyle \scriptstyle 16\,}$s ${\displaystyle \scriptstyle -8i\,}$s ${\displaystyle \scriptstyle -4\,}$s ${\displaystyle \scriptstyle 2i\,}$s ${\displaystyle \scriptstyle 1\,}$s 1 0 1 0 1 0 2 0 1

This particular example demonstrates that the base ${\displaystyle \scriptstyle 2i\,}$ representation of real numbers is the same as that in negaquartal except for the "riffling" in of 0s corresponding to the odd-indexed powers of ${\displaystyle \scriptstyle 2i\,}$. To obtain the base ${\displaystyle \scriptstyle 2i\,}$ representation of a complex number ${\displaystyle \scriptstyle a+bi\,}$, do as above for the real part, then again for the real part of ${\displaystyle \scriptstyle 2i(a+bi)\,=\,-2b+2ai\,}$ then shift right to divide it back by ${\displaystyle \scriptstyle 2i\,}$, giving the digits corresponding to the odd-indexed powers of ${\displaystyle \scriptstyle 2i\,}$. Like negabinary and negaquartal, quater-imaginary dispenses with the need for a sign bit, but additionally, eliminates the need to represent the real and imaginary parts of a complex number separately. Thus, rather than writing ${\displaystyle \scriptstyle -12+15i\,}$, we can simply write 102300.2, where

-12 =    300${\displaystyle _{2i}}$ (real part of ${\displaystyle -12+15i}$, 30${\displaystyle _{-4}}$ interleaved with 0s)
15i = 102000.2${\displaystyle _{2i}}$ (real part of ${\displaystyle 2i(-12+15i)=-30-24i}$, 1202${\displaystyle _{-4}}$ interleaved with 0s, then shift right to divide it back by ${\displaystyle 2i}$)
--------
102300.2${\displaystyle _{2i}}$


### Conversion tables

Base 10 to base ${\displaystyle \scriptstyle 2i\,}$
Base 10 Base ${\displaystyle \scriptstyle 2i\,}$
1 1
2 2
3 3
4 10300
5 10301
6 10302
7 10303
8 10200
9 10201
10 10202
11 10203
12 10100
13 10101
14 10102
15 10103
16 10000
Base 10 Base ${\displaystyle \scriptstyle 2i\,}$
−1 103
−2 102
−3 101
−4 100
−5 203
−6 202
−7 201
−8 200
−9 303
−10 302
−11 301
−12 300
−13 1030003
−14 1030002
−15 1030001
−16 1030000
Base 10 Base ${\displaystyle \scriptstyle 2i\,}$
1i 10.2
2i 10.0
3i 20.2
4i 20.0
5i 30.2
6i 30.0
7i 103000.2
8i 103000.0
9i 103010.2
10i 103010.0
11i 103020.2
12i 103020.0
13i 103030.2
14i 103030.0
15i 102000.2
16i 102000.0
Base 10 Base ${\displaystyle \scriptstyle 2i\,}$
−1i 0.2
−2i 1030.0
−3i 1030.2
−4i 1020.0
−5i 1020.2
−6i 1010.0
−7i 1010.2
−8i 1000.0
−9i 1000.2
−10i 2030.0
−11i 2030.2
−12i 2020.0
−13i 2020.2
−14i 2010.0
−15i 2010.2
−16i 2000.0

Base ${\displaystyle \scriptstyle 2i\,}$ to base 10
Base ${\displaystyle \scriptstyle 2i\,}$ Base 10
0 0
1 1
2 2
3 3
10 0+2i
11 1+2i
12 2+2i
13 3+2i
20 0+4i
21 1+4i
22 2+4i
23 3+4i
30 0+6i
31 1+6i
32 2+6i
33 3+6i
Base ${\displaystyle \scriptstyle 2i\,}$ Base 10
100 −4
101 −3
102 −2
103 −1
110 −4+2i
111 −3+2i
112 −2+2i
113 −1+2i
120 −4+4i
121 −3+4i
122 −2+4i
123 −1+4i
130 −4+6i
131 −3+6i
132 −2+6i
133 −1+6i
Base ${\displaystyle \scriptstyle 2i\,}$ Base 10
200 −8
201 −7
202 −6
203 −5
210 −8+2i
211 −7+2i
212 −6+2i
213 −5+2i
220 −8+4i
221 −7+4i
222 −6+4i
223 −5+4i
230 −8+6i
231 −7+6i
232 −6+6i
233 −5+6i
Base ${\displaystyle \scriptstyle 2i\,}$ Base 10
300 −12
301 −11
302 −10
303 −9
310 −12+2i
311 −11+2i
312 −10+2i
313 −9+2i
320 −12+4i
321 −11+4i
322 −10+4i
323 −9+4i
330 −12+6i
331 −11+6i
332 −10+6i
333 −9+6i

## Arithmetic operations

For the examples in the discussion below, we will use two pairs of integers: 12 and 8 (10100${\displaystyle _{2i}}$ and 10200${\displaystyle _{2i}}$, respectively), ${\displaystyle 7-i}$ and ${\displaystyle -12+16i}$ (10303.2${\displaystyle _{2i}}$ and 102300${\displaystyle _{2i}}$, respectively).

Addition amounts to base −4 addition of real parts (digits corresponding to even powers of ${\displaystyle \scriptstyle 2i\,}$) and base −4 addition of imaginary parts (digits corresponding to odd powers of ${\displaystyle \scriptstyle 2i\,}$). Remember that "carrying" in base −4 (in fact for all negative bases) is subtracting, and this is applied separately for even indexed digits (real part) and for odd indexed digits (imaginary part).

In some cases, addition is as straightforward as in decimal, with no carrying needed at all.

  10100
+ 10200
-----
= 20300


That is 12 + 8 = 20.

But for our second pair of operands, it is necessary to "carry." (Here 3${\displaystyle _{-4}}$ + 3${\displaystyle _{-4}}$ gives 2${\displaystyle _{-4}}$ carry 1${\displaystyle _{-4}}$, i.e. subtract 1 two positions to the left.)

   10303.2
+ 102300.0
--------
= 102203.2


That is ${\displaystyle (7-i)+(-12+16i)=-5+15i}$.

### Subtraction

Subtraction amounts to base −4 subtraction of real parts (digits corresponding to even powers of ${\displaystyle \scriptstyle 2i\,}$) and base −4 subtraction of imaginary parts (digits corresponding to odd powers of ${\displaystyle \scriptstyle 2i\,}$). Remember that "borrowing" in base −4 (in fact for all negative bases) is adding, and this is applied separately for even indexed digits (real part) and for odd indexed digits (imaginary part).

In some cases, subtraction is as straightforward as in decimal, with no borrowing needed at all.

  20300
- 10100
-----
= 10200


That is 20 – 12 = 8.

For our second pair of operands, it is necessary to "borrow." (Here 2${\displaystyle _{-4}}$ − 3${\displaystyle _{-4}}$ borrow 1${\displaystyle _{-4}}$, i.e. add 1 two positions to the left, gives 2${\displaystyle _{-4}}$.)

  102203.2
-  10303.2
--------
= 102300.0


That is ${\displaystyle (-5+15i)-(7-i)=(-12+16i)}$.

(...)

### Division

Division within n-imaginary numeral systems is a challenge!

## Algebraic operations

(...)

### Root extraction

Root extraction within n-imaginary numeral systems is a challenge!

## Sequences

A212494 Base ${\displaystyle \scriptstyle 2i\,}$ representation of nonnegative integers.

{0, 1, 2, 3, 10300, 10301, 10302, 10303, 10200, 10201, 10202, 10203, 10100, 10101, 10102, 10103, 10000, 10001, 10002, 10003, 20300, 20301, 20302, 20303, 20200, 20201, 20202, 20203, ...}

A007608 Nonnegative integers in base −4. (digits of base ${\displaystyle \scriptstyle 2i\,}$ representation corresponding to even powers of ${\displaystyle \scriptstyle 2i\,}$, i.e. real part)

{0, 1, 2, 3, 130, 131, 132, 133, 120, 121, 122, 123, 110, 111, 112, 113, 100, 101, 102, 103, 230, 231, 232, 233, 220, 221, 222, 223, 210, 211, 212, 213, 200, 201, 202, 203, ...}

A177505 Base ${\displaystyle \scriptstyle 2i\,}$ representation of nonnegative integers reinterpreted in base 4.

{0, 1, 2, 3, 304, 305, 306, 307, 288, 289, 290, 291, 272, 273, 274, 275, 256, 257, 258, 259, 560, 561, 562, 563, 544, 545, 546, 547, 528, 529, 530, 531, 512, 513, 514, 515, ...}

A212542 Base ${\displaystyle \scriptstyle 2i\,}$ representation of negative integers.

{103, 102, 101, 100, 203, 202, 201, 200, 303, 302, 301, 300, 1030003, 1030002, 1030001, 1030000, 1030103, 1030102, 1030101, 1030100, 1030203, 1030202, 1030201, 1030200, ...}

A212526 Negative integers in base −4. (digits of base ${\displaystyle \scriptstyle 2i\,}$ representation corresponding to even powers of ${\displaystyle \scriptstyle 2i\,}$, i.e. real part)

{13, 12, 11, 10, 23, 22, 21, 20, 33, 32, 31, 30, 1303, 1302, 1301, 1300, 1313, 1312, 1311, 1310, 1323, 1322, 1321, 1320, 1333, 1332, 1331, 1330, 1203, 1202, 1201, 1200, ...}

• n-imaginary numeral systems (with radix ${\displaystyle \scriptstyle {\sqrt {-n}},\,n\,\geq \,2\,}$, and digits from the set ${\displaystyle \scriptstyle \{0,\,...,\,n-1\}\,}$)
• Bi-imaginary numeral system (with radix ${\displaystyle \scriptstyle {\sqrt {-2}}\,=\,{\sqrt {2}}\,i\,}$ and digits from the set ${\displaystyle \scriptstyle \{0,\,1\}\,}$)