| 
 | 
 
 
发表于 2012-11-17 00:25:34
|
显示全部楼层
 
 
 
转: 
The advantage of the Gray code over pure binary numbers is that a number in 
Gray code changes by one bit as it proceeds from one number to the next. 
To obtain a different Gray code, one can start with any bit combination and proceed 
to obtain the next bit combination by changing only one bit from 0 to 1 or 1 to 0 
in any desired random fashion, as long as two numbers do not have identical code 
assignments. The Gray code is also known as reflected code. 
Since gray code is a unit distance code, every next value differs from previous in 
one bit position, will result in a maximum of a single bit error/transition. For example 
if the counter changes from “1010” to “1011”, the sampling logic will either 
read “1010” (old value) or “1011” (new incremented value) but no other value. |   
 
 
 
 |