Thus, performing an exclusive or on a bit at position with the bit at position leaves the order of codewords intact if , and reverses the order of blocks of codewords if . Now, this is exactly the same operation as the reflect-and-prefix method to generate the Gray code.
thus performing an exclusive or on a bit at position with the bit at position leaves the order of codewords intact if  and reverses the order of blocks of codewords if  now this is exactly the same operation as the reflect-and-prefix method to generate the gray code