I'm aware that in Gray code the successive numbers will differ only by one bit. However I'm not able to proceed further.

  • \$\begingroup\$ Can you write the truth table to convert straight binary to gray code? \$\endgroup\$
    – The Photon
    Feb 25, 2017 at 16:51
  • \$\begingroup\$ Yeah, I'm aware of binary to gray conversion. Implementation in terms of XOR gates. \$\endgroup\$
    – Fawaz
    Feb 25, 2017 at 16:53
  • \$\begingroup\$ So, write down the truth table and see which lines are 1's for which output bits. \$\endgroup\$
    – The Photon
    Feb 25, 2017 at 17:01
  • \$\begingroup\$ But the conversion is not from binary to gray. Gray equivalents for number 'n' and 'n+1' is given. Also how to relate h and g functions ? \$\endgroup\$
    – Fawaz
    Feb 25, 2017 at 17:03
  • \$\begingroup\$ So if you have the truth table for input 'n', it's very very easy to make the truth table for input 'n+1'. \$\endgroup\$
    – The Photon
    Feb 25, 2017 at 17:29

1 Answer 1


The question is asking you the value of N where the value of Gx = 1 for N+1.

Map the current state N and Next state N+1 for the 4 bit Gray code

enter image description here

Read off the min term for each next case of Gx = 1

G0 =
G1 =
G2 =
G3 =

--> Answer = G2 is correct though they have the terms out of order in the question

  • \$\begingroup\$ Given g() is a function of H, I think you ought to re-sort the table according to H before numbering the minterms. \$\endgroup\$
    – The Photon
    Feb 25, 2017 at 18:53
  • \$\begingroup\$ @ThePhoton. Feel free....it's pure choice. I prefer to work in sequence. \$\endgroup\$ Feb 25, 2017 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.