if you use proteus vsm simulation even a demo copy will do
get one at www.labcenter.co.uk
then comvdd dll project outputs gray code 2-16bit adjustable
it can also convert binary input to gray
in the comvdd archive there is also a folder containing info
i gleemed from the net to get this to work using c++
there is also a heep of code in c and c++ for conversion and output of gray code
youll find comvdd and other dlls here for download {use no points mirror }
dont forget to place the archive in the root of your c or d drive
BEFORE extracting
attached is a picture showing 6bit encoded binary to gray output
{slider value is encoded but you can also bus load binary to instanly convert}
I used the following MATLAB expressions to generate gray code tables for 2, 3, 4, 5, and 6 bits.
You will notice the relatively simple repeating patterns in the tables.