Gray Code

Prev: Unusual Bases for Number Systems

Next: Cyclic Redundancy Check

Sections

  • 13-1 Gray Code
  • 13-2 Incrementing a Gray-Coded Integer
  • 13-3 Negabinary Gray Code
  • 13-4 Brief History and Applications

Problems

  1. Show that if an integer is even, then , the reflected binary Gray code of , has an even number of 1-bits, and if is odd, has an odd number of 1-bits.

  2. A balanced Gray code is a cyclic Gray code in which the number of bit changes is the same in all columns, as one cycles around the code.

    (a) Show that an STGC is necessarily balanced.

    (b) Can you find a balanced Gray code for that has eight code words?

  3. Devise a cyclic Gray code that encodes the integers from 0 to 9.

  4. Given a number in prime decomposed form, show how to list all its divisors in such a way that each divisor in the list is derived from the previous divisor by a single multiplication or division by a prime.