Jump to content

Gray Encoding

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 65.33.102.40 (talk) at 03:35, 16 June 2005 ('Gray Encoding' of state machines). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Gray Encoding

'Gray Encoding' in digital design lingo commonly refers to a specific encoding of a state machine where a minimal number of flip flops are used to represent all valid states, and where advancing from one state to the next involves a change in only one bit. For example, a 'Gray Encoded' state machine with nine states would use four flip flops and might use a sequence such as:

0000
0001
0011
0010
0110
0111
0101
0100
1100

The advantage to using 'Gray Encoding' above ordinary binary encoding is that since only one bit is changing, any combinational logic downstream of the state machine will not exhibit glitches or race conditions.

See also: Gray Code

Other types of state machine encoding:

binary encoding
one hot
one cold