title: Generate a truth table based on 3 bit gray code
body: <p>I am struggling to understand gray code and how it affects output. Basically, the end goal of what I am trying to do is is to design a circuit based off of a truth table. I understand most of this, except for the gray code part. </p>
  
  <p>Let's say I am given this truth table, where the output changes at each rising clock edge according to the 3 bit gray code (last value cycles back to first value). How do I fill in the output? Am I supposed to take the left value, and figure out its next value in gray code and fill that in?</p>
  
  <pre><code>Inputs   |  Outputs
  -------------------
  S2 S1 S0 | N2 N1 N0
  --------------------
  0  0  0  | ?  ?  ?
  0  0  1  |
  0  1  0  |
  0  1  1  |
  1  0  0  |
  1  0  1  |
  1  1  0  |
  1  1  1  |
  </code></pre>
  
  <p>My first reaction is I see the left columns are not in grey code. Would I just fill it according to the basic grey code sequence? The 3 bit sequence for gray code is 000, 001, 011, 010, 110, 111, 101, 100. Would I just fill in the right side of the chart like 001, 011, 110, 010 etc?</p>