Re: Assignment 6

Himanshu Nautiyal (nautiyal@calvin.cs.washington.edu)
Fri, 21 Feb 1997 10:17:12 -0800 (PST)

On Fri, 21 Feb 1997, 'NotAgain!' B. Hughes wrote:

> I assume that Professor Somani means the greycode counter should
> count from zero to fifteen and then back down to zero, not immediately
> wrap around to zero after hitting fifteen, since the first way seems more
> 'natural' for a greycode counter. What does not seem clear in the
> homework instructions is the 'and then back to 0000' phrase. Somebody
> please clarify the instructions. Thanks

Note that the greycode counter reorders the sixteen 4-bit
combinations in such a way that at most one bit is different between
successive numbers in the sequence. The whole sequence is given in the
question. Note that the last item in the sequence is 1000. So, if your
state machine has to transition out of 1000, it goes to 0000 in ONE step
(note that again, only one bit changed in this transition). You can just
consider this to be a circular sequence in which your state machine has to
keep transitioning - it is not a "counter" in the normal binary encoding
of numbers, it is a "counter" in the Gray code encoding of numbers.

Himanshu Nautiyal
http://www.cs.washington.edu/homes/nautiyal