Patent ID: 6885321

Claim:
A method executable by a programmed processor for generating a binary Gray code, comprising: providing an n-bit binary Gray code C n ; using C n , generating an n+2 bit binary Gray code C n+2 having 4M code words c 0 n through c N−1 n , where N is less than or equal to 2 n , by: changing the leftmost bit between the code words c 0 n and c 1 n ; finding the largest value M such that the rightmost bit changes between code words c M−2 n and c M−1 n ; and forming 4M code words of C n+2 by extending the first M code words of C n by a single bit at each end, with reversals in the order of the code words of C n as required to yield an extended code X, wherein: x k n + 2 = { [ 0 , c k n , 0 ] , 0 < k ≤ M [ 0 , c M - k + 1 n , 1 ] , M < k ≤ 2 ⁢ M [ 1 , c k n , 1 ] , 2 ⁢ M < k ≤ 3 ⁢ M [ 1 , c M - k + 1 n , 0 ] , 3 ⁢ M < k ≤ 4 ⁢ M .