Binary-reflected Gray: g = n โŠ• โŒŠn / 2โŒ‹. Decode Gray back to binary with the usual prefix-XOR chain.

  • n (decimal) 13
  • Binary (4 bits) 1101
  • Gray (decimal) 11
  • Gray (binary) 1011
  • Decode Gray โ†’ n 13