Created gray code incrementer