1

I am currently trying to put this state diagram into a truth table:

enter image description here

I wrote the truth table like this:

enter image description here

When I try to get the expression for q1+ I get: q1+ = q1q0' + q1q0x, but I can apparently get: q1+ = q1q0 + q0*x

Do you setup the K-map differently when using graycode or what am I doing wrong here?

JRE
  • 67,678
  • 8
  • 104
  • 179
Zeptuz
  • 11
  • 2

1 Answers1

1

You must order the Karnaugh map cells in gray code order if you want to do minimization, but we normally write the rows of the truth table in normal binary counting order. In this case it looks like you have written the truth table in gray code order which was then incorrectly transcribed into the K map. The input conditions in the truth table and K map must be the same for each 1 or 0 that you enter in the K map.

Elliot Alderson
  • 31,192
  • 5
  • 29
  • 67
  • Am I wrong in assuming that the state diagram is in graycode? Then I assume the truth table should be in gray code aswell? How am I supposed to setup the K-map correctly? 00 01 10 11? – Zeptuz Oct 24 '22 at 14:13
  • I mean I guess I know how to do it now. But it confuses me, could I not have put the 10 where the 11 is in the state diagram and 11 where the 10 is in the state diagram? thats what I did the first time. – Zeptuz Oct 24 '22 at 14:20
  • 0 1 1 from truth table is in 0 1 0 in kmap. It makes no difference how the truth table is written as long as it goes in the correct position on the kmap. – StainlessSteelRat Oct 24 '22 at 17:28
  • As @StainlessSteelRat said, it doesn't matter how you write the truth table but you must be careful to transcribe the entries from the truth table to the correct cells in the K map. It looks like you wrote your truth table in Gray code order but transcribed it assuming that it was written in normal binary order so your 1s and 0s ended up in the wrong cells. – Elliot Alderson Oct 24 '22 at 17:31