GrayCode generator