Why is gray code called reflected code?
Asked Answered
K

1

5

I understand that each gray code differs from its preceding code by one bit, but i don't exactly understand why its called reflected. I came across this website https://www.pc-control.co.uk/gray_code.htm, where it says " The gray code is sometimes referred to as reflected binary, because the first eight values compare with those of the last 8 values, but in reverse order", but the first 8 gray codes are not comparable to the last 8 gray codes in reverse order as can be seen from the gray code table on their website. To add to my confusion the gray code table differs from the gray code table on my textbook, for eg gray code for 9 = 1000 on my textbook while on the website its 9 = 1101.

Kenner answered 1/1, 2016 at 11:36 Comment(0)
P
11

Consider the sequence on the linked page:

0000
0001
0011
0010
0110
0111
0101
0100
1100
1101
1111
1110
1010
1011
1001
1000

Remove the most significant bit and you obtain a nice reflected sequence:

x000
x001
x011
x010
x110
x111
x101
x100
-------- mirror
x100
x101
x111
x110
x010
x011
x001
x000

Please note that the same kind of reflection can be found for Gray sequences of any width.

Pisano answered 1/1, 2016 at 11:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.