## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## Appendix D. Gray Codes

### Gray, But Not Gloomy

When moving between states in a standard binary sequence, multiple bits may change from 0 to 1 or vice versa; for example, two bits change value when moving from 00102 to 01002. In the physical world there is no way to ensure that both bits will transition at exactly the same time, so this system may actually pass through an intermediate state. That is, our intended state change of 00102 to 01002 might result in the sequence 00102 to 01102 to 01002, or possibly 00102 to 00002 to 01002. And if more bits are changing, we might bounce though a series of intermediate values.

One way to avoid this problem is to use a Gray code,[1] in which only a single bit changes when moving between states (Figure D.1 ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required