Let us have a look at Gray code in Decimal representation.
Decimal
|
Binary
|
Gray
|
Decimal (Gray to Decimal)
|
0
|
0000
|
0000
|
0
|
1
|
0001
|
0001
|
1
|
2
|
0010
|
0011
|
3
|
3
|
0011
|
0010
|
2
|
4
|
0100
|
0110
|
6
|
5
|
0101
|
0111
|
7
|
6
|
0110
|
0101
|
5
|
7
|
0111
|
0100
|
4
|
8
|
1000
|
1100
|
12
|
9
|
1001
|
1101
|
13
|
On adding the Decimal number of Gray code,
it gives , 0+1+3+2+6+7+5+4+12+13 ,
Sum as 53.