Unusual Bases for Number Systems

Prev: Some Elementary Functions

Next: Gray Code

Sections

  • 12-1 Base
  • 12-2 Base
  • 12-3 Other Bases
  • 12-4 What Is the Most Efficient Base?

Problems

  1. Schroeppel’s formula for converting from base to binary has a dual involving the constant 0x5555555. Can you find it?

  2. Show how to add 1 to a base number using the arithmetic and logical operations of a binary computer. For example, 0b111 becomes 0b100.

  3. Show how to round a base number down, in the negative direction, to a multiple of 16 using the arithmetic and logical operations of a binary computer. For example, 0b10 becomes 0b110000.

  4. Write a program, in a language of your choice, to convert a base integer to the form , where and are real integers. For example, if you give the program the integer 33, or 0x21, it should display something like .

  5. How would you convert a number in base to its negative? Extract its real part? Extract its imaginary part? Convert it to its complex conjugate? The complex conjugate of is .