07-01-2003, 05:38 AM
I had almost forgot about Gray's Code. A pattern of bytes or words where each byte/word differs by only one bit from the preceding byte/word. An engineer once wanted to use Gray's Code to test a modem he designed, so he asked a buddy of mine and me to write the program to generate the code. We did it in assembler, all straight-line code, no if's (no branching), and of course no recursion. Too bad I can't remember how we did it.
Do you have the iterative version of the algorithm?
*****
Do you have the iterative version of the algorithm?
*****