Hey, for n=3,4. Does a mux I use in n=2 or n=3 counts as a mux I allready used?
In other words - am I allowed to use only 1 mux in total for the 4 circuits or 1 at most for each circuits, unrelated for the recursive circuit I am using?
When said - the design must use the Algorithm 1, does it mean to imply all of the algorithm and then to choose (by a Mux) between the 2^n different strings?
You are allowed to use 1 MUX in each circuit, i.e., 1 MUX in b2g2
, 1 MUX in b2g3
, and 1 MUX in b2g4
.
Algorithm 1 outputs the entire Gray code, i.e. the list of Gray code representations of all 0 \le j < n for a given n and f[n - 1 : 0]. The circuit you need to build computes the Gray code representation for a single input. However, the logic behind this computation should be identical to the logic used in Algorithm 1.
The base case and recursive step given in Section 2 do precisely this. Therefore, if your circuit implementation is equivalent to these, that is sufficient.