12-2. Base −1 + i

By using − 1 + i as the base, where i is all complex integers (complex numbers with integral real and imaginary parts) can be expressed as a single “number” without an explicit sign or other irregularity. Surprisingly, this can be done using only 0 and 1 for digits, and all integers are represented uniquely. We will not prove this or much else about this number system, but will just describe it very briefly.

It is not entirely trivial to discover how to write the integer 2. [1] However, this can be determined algorithmically by successively dividing 2 by the base and recording the remainders. What does a “remainder” mean in ...

Get Hacker's Delight now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.