Wolfram Computation Meets Knowledge

GrayCode

Find the Gray code for an integer

ResourceFunction["GrayCode"][int]

gives the Gray code of the integer n.

Examples

Basic Examples

Find the Gray code of an integer:

In[1]:=
ResourceFunction["GrayCode"][14]
Out[1]=

More Examples

Scope

Retrieve the ResourceFunction:

In[2]:=
ResourceFunction["GrayCode"]
Out[2]=

Retrieve the ResourceObject:

In[3]:=
ResourceObject["GrayCode"]
Out[3]=

GrayCode threads itself element-wise over lists:

In[4]:=
ResourceFunction["GrayCode"][Range[25]]
Out[4]=

Resource History