Gray Codes

Codes are sometimes created with a particular structure.  For example, Gray codes are a sequential code where predecessor and successor code words differ in exactly one bit.  This property wraps between the first and the last code words.  Here is an example of a 4-bit gray code:

  • “0000”
  • “0001”
  • “0010”
  • “0011”
  • “0010”
  • “0110”
  • “0111”
  • “0101”
  • “0100”
  • “1100”
  • “1101”
  • “1111”
  • “1110”
  • “1010”
  • “1011”
  • “1001”
  • “1000”