1
$\begingroup$

from my understanding the truth table is supposed to generate every possible combination of true and false values without the order of the combination taking into account.

however one of my teachers said that their is a particular order to each row that is used to generate multiple combinations. the top two truth tables were said to be correct and the bottom truth tables wrong

can you please explain this to me.

$\endgroup$

closed as unclear what you're asking by David Richerby, Evil, Discrete lizard, Yuval Filmus, Luke Mathieson Feb 12 at 23:49

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Your understanding is correct. However, can you think of any way in which your teacher might make sense? $\endgroup$ – Apass.Jack Feb 4 at 16:00
  • 1
    $\begingroup$ I don't understand your question. Are you just asking if it matters what order the rows of a truth table are written in? $\endgroup$ – David Richerby Feb 4 at 16:10
  • $\begingroup$ @DavidRicherby yes $\endgroup$ – Abdullah Mustapha Feb 4 at 16:42
  • 1
    $\begingroup$ The order of the row don’t matter, as long as you cover every possible combination of input values. Doing this without an order in mind, does not make it incorrect, but it does make it easier to miss some entries. I think your prof is suggesting using a order so you cover all the combinations in a systemic way. What I do, if I have N Boolean inputs for example, I start with the first row have all values assumed false. In the next row, I make the Nth bool true, then only the N-1 true, then both N and N-1 true, then N-2 true with N and N-1 false, and so on. Any such system is fine. $\endgroup$ – ScottK Feb 4 at 16:50
  • 2
    $\begingroup$ @ScottK Summary: you order the rows to be the binary representation of the numbers $0, \dots, 2^N-1$. $\endgroup$ – David Richerby Feb 4 at 16:53
1
$\begingroup$

"The order of the row don’t matter, as long as you cover every possible combination of input values. Doing this without an order in mind, does not make it incorrect, but it does make it easier to miss some entries. I think your prof is suggesting using a order so you cover all the combinations in a systemic way. What I do, if I have N Boolean inputs for example, I start with the first row have all values assumed false. In the next row, I make the Nth bool true, then only the N-1 true, then both N and N-1 true, then N-2 true with N and N-1 false, and so on. Any such system is fine." -@Scottk

"@ScottK Summary: you order the rows to be the binary representation of the numbers $0, \dots, 2^N-1$. " -@DavidRicherby

"Your prof seems to be wanting you to follow the binary ordering that @DavidRicherby pointed out earlier: either starting with all true or all false. All orders are correct but go with the binary order since that is what your prof seems to be teaching you, and it is was most pros use. There are other useful orderings that engineers use for circuit simplification for example Karnaugh Maps https://en.m.wikipedia.org/wiki/Karnaugh_map" -@Scottk

$\endgroup$
  • $\begingroup$ I am rather surprised that you came up with an answer that is very different from the helpful comments given by ScottK and David Richerby . "Preferences may exist from the person taking the course", which is not very interesting since we are seeking the scientific reason behind that person's preference. I have not seen Gray code being used in the current case of truth tables a lot. Do you? $\endgroup$ – Apass.Jack Feb 6 at 19:04
  • $\begingroup$ @Apass.Jack I was hoping to summarize. but it may have derailed. I meant the person teaching the course. I will fix that $\endgroup$ – Abdullah Mustapha Feb 6 at 20:08
  • $\begingroup$ @Apass.Jack maybe I didn't get it myself, but I think I do now. $\endgroup$ – Abdullah Mustapha Feb 6 at 20:24
  • $\begingroup$ Sorry if I appear nitpicking, but i think the first comment by @ScottK contains the most helpful information about the situation. 1) order does not matter for correctness. 2) order does matter since a particular order of the rows such as the most popular one by the order of increasing binary numbers helps easier production, visualization and usage. $\endgroup$ – Apass.Jack Feb 6 at 23:37
  • $\begingroup$ @Ab Upvoted although I would love to see your own words that explains the ideas coherently. $\endgroup$ – Apass.Jack Feb 8 at 8:49

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