Create Gray code