gray code display error correction