Anda di halaman 1dari 2

A "Binary" System for Complex Numbers

WALTE [~ ~)ENNEY
Deparlment of Defense, Washington, D. C.

Abstract. A n u m b e r system with the complex number - 1 + i as base is developed. This


permits the r e p r e s e n t a t i o n in binary form of any complex number A -~- Bi with A and B
integral or of the form ~:/2'~. I n the l a t t e r case a separat, rix is used to indicate negative powers
of the base.

Computer operations with complex numbers are usually performed by dealing


with the real and imaginary parts separately and combining the two as a final
step. It might be an advantage in some problems to treat a complex number as a
unit and to carry out all operations in this form. The number system to be de-
scribed permits the representation of a complex number as a single binary
number to a degree of accuracy limited only by the capacity of the computer.
It is binary in that only the two symbols 0 and 1 are used; however, tim base is
~ot 2, but the complex mlmber -- 1 + i. (The quantity - 1 - i would be equally
suitable attd, in fact, for real numbers, it is immaterial which of these two we
consider the base.) A simple program would allow arithmetic operations to be
performed in this mode.
Since ( - 1 + i) 4 = - 4 , the representation of real integers (positive, negative
0r zero) may be made to depend on powers of - 4 . Thus if N -- a0 + a , ( - 4 ) +
a~(-4) e + . + a k ( - 4 ) k, where each a is 0, 1, 2 or 3, N cast be expressed in
terms of - 1 -4- i as a k a k ~ L . a ~ a o , with the a's replaced by the four-bit equiva-
lents 0000, 0001, 1100 or 1101 according as a = 0, 1, 2 or 3, respectively. Initial
0's are, of course, neglected.
Likewise, since (--1 + i) 6 = 8i, the representation of imaginary integers
may be made to depend on powers of 8i. Every imaginary integer can be written
in the form a0 + b0(8i) + a~(8i): + b1(8i) ~ + "'" where - 6 i < a 5 i and
-4 < b _<- 3. To express an imaginary integer in base - 1 + i , it is written in
terms of powers of 8i with appropriate a's and b's. The required representation
is then this number with the digits replaced by their (eomplex) binary equiva-
let~ts. These are:
--4 10000 --6i 110100
--3 10001 --5i 110111
--2 11100 --4i 110000
--1 11101 -ai 110011
0 0 -2i 100
1 1 -i ill
2 Ii00 0 0
3 II01 i ii

rf the equivalent for any digit (except the first) contains fewer than six bits,
enough 0's are prefixed to round it out to six.
A complex number is the sum of the rea.1 and imaginary parts, which combine
to form a single binary number. This can be converted into its decimal equivalent
by adding the indicated powers of - 1 + i.
All the arithmetic operations can be performed on these numbers if the proper
247

Journal of the Association for Computing Machinery, Vol. 12, No. 2 (April, 1965), pp. 247-248
248 WALTE] PENNEY

rules are observed. Corresponding to the ordinary ( c o m p u t e r ) rules, 1 -/- 1 = 10


and 1 + 111 . . . (to limit of machine) = 0, we have the rules 1 -t- 1 = 110~?
and 11 -t- 111 = 0. These rules apply regardless of the positions of the bits it~ a
number. For example, if two nmnbers with l ' s in position n are added, this ~,~iil
result in l ' s in positions n-t-3 and n + 2 and O's in positions . n + l and n in th~
SUHI.
B y the use of negative powers of - 1 + i it is possible to extend this system t{)
the representation of complex numbers A + B i where A and B are fractions with
denominators powers of 2. A point m a y be used to separate the whole and frac-
tional parts, although some fractions m a y have a mixed representation; , t'0r
example, is 1.11. Since a real number can be a p p r o x i m a t e d to a n y desired degre(~
of accuracy by a fraction of the form k/2", this n u m b e r s y s t e m will permit the~
representation of all complex numbers to a degree of a c c u r a c y limited only by
the capacity of the computer.
RECEIVED SEPTEMBER, 1964

REFERENCE
1. PENNEY, W. A numeral system with a negative base. Math. Student J. (May 1964).

Anda mungkin juga menyukai