> >First, Gray codes are not unique. That is, for a given number of bits > >in the binary representation, there is generally more than one Gray > >code sequence corresponding to the sequence of n-bit integers. Of > >course, the successive elements of every such Gray code differ by just > >one bit. > > > > > Hi Warren, > > I beg to differ, the Gray code has some interesting properties which > are NOT shared by all "single distance codes". The most obvious of these > properties is the reflected symmetry. > > I realize that we are in danger in just nit-picking over names here but > the "Gray code" as invented by Frank Gray is as far as I know a unique > "single distance" code, and to label all single distance codes as Gray > codes is wrong. (although it appears Bourns have done just that!) > > > The ONLY three bit Gray code sequence is ... > > 000 > 001 > 011 > 010 > 110 > 111 > 101 > 100 > > Note: how the second half is a reflection of the first half with hi bit set. > > > > Ray Gardiner, Shepparton, Victoria, Australia: ray@netspace.net.au > ------------------- Hello Ray, With all due respect, Gray-codes, also known as cyclic codes, are defined as _any_ scheme for mapping the sequence of integers into another representation in which successive members differ by one bit in the representation. The particular Gray-code you have referred to and illustrated is a "reflected" Gray-code. The fact that it is possible to designate a specific category of Gray-code (in this case "reflected") in itself suggests that there are other Gray-codes. While I don't know for certain, I will accept that the Gray-code as originally described may have been the reflected code you illustrated. However, there is no doubt that the accepted definition of a Gray-code encompasses any scheme with the cited mapping properties. See Gray-code in, for example, The McGraw-Hill Dictionary of Scientific and Technical Terms or Van Nostrand's Scientific Encyclopedia. They define Gray-code as "a" method, not "the" method. More particularly, see: Digital Computer Systems Principles by Herbert Hellerman, McGraw-Hill, p. 315 (1967). In his section on Encoding, Hellerman makes it explicitly clear that the reflected code is but one of many codes that fall under the general definition of a Gray-code. At the risk of going too far afield, I will suggest that there is an interesting relationship between the reflected symmetry of the "reflected" Gray-code and the sequence of right and left turns of a creature known as a Dragon curve. --- Warren Davis ================================================ Davis Associates, Inc. 43 Holden Road West Newton, MA 02165 U.S.A. Tel: 617-244-1450 FAX: 617-964-4917 Visit our web site at: http://www.davis-inc.com ================================================