Verify that a binary $n$ -tuple $a_{n-1} \cdots a_{1} a_{0}$ is in place $k$ in the Gray code order list where $k$ is determined as follows: For $i=0,1, \ldots, n-1$, let
$$
b_{i}=\left\{\begin{array}{ll}
0 & \text { if } a_{n-1}+\cdots+a_{i} \text { is even, and } \\
1 & \text { if } a_{n-1}+\cdots+a_{i} \text { is odd. }
\end{array}\right.
$$
Then
$$
k=b_{n-1} \times 2^{n-1}+\cdots+b_{1} \times 2+b_{0} \times 2^{0}
$$
Thus, $a_{n-1} \ldots a_{1} a_{0}$ is in the same place in the Gray code order list of binary $n$ -tuples as $b_{n-1} \ldots b_{1} b_{0}$ is in the lexicographic order list of binary $n$ -tuples.