Absolute encoder gray code output

I am using absolute encoder OUTPUT of which is gray sequence>

I should get gray sequence of

0
1
11
10
110
111
101
100
1100
1101
1111
1110
1010
1011
1001
1000
11000
11001
11011
11010
11110
so ON

But I am getting gray output in other form. which I cannot convert in other form in decimal or binary. Here is the output sequence I am getting:

0
1
101
100
110
111
10111
10110
10100
10101
10001
10000
10010
10011
11011
11010
11000
11001
11101
11100
11110
So ON

Please suggest any link or code to convert gray code using arduino.

Post a link to the encoder data sheet.

I should get gray sequence of

What makes you think that?

Invert the bit values.

And post details of the particular encoder - if its part number was in the subject line, others with the same
issue would easily find this posting and a fix...