Gray code by nn

{for(i=2^$1;i-->j=0;o=RS o)for(v=i;j++<$1;)o=(v-(v=int(v/2)))%2o}$0="Gray code  n="$1o

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page