What problem with my exits from the truth table?

Asked

Viewed 164 times

1

I am training how to extract a truth table, from a statement in Portuguese, which I took the following exercise:

inserir a descrição da imagem aqui The figure above represents the crossing of streets A and B. At this intersection we want to install an automatic system for traffic lights with the following characteristics:

  • 1) When there are cars passing only on B Street, the traffic light 2 must remain green so that these vehicles can travel freely.

  • 2) When there are cars only transiting on Street A, the traffic light 1 should remain green for the same reason.

  • 3) When there are cars passing through Streets A and B, we should open the traffic light to Street A, because it is preferred.

After this going to the answers the author tells me the following:

To situation 0 (A = 0 and B = 0) represents the absence of vehicles on both streets. If we don’t have cars, whatever sign remains open. Let us adopt, for example, that the green of sign 2 remains access. In this case, we fill the truth table as follows:

inserir a descrição da imagem aqui

Thus the result of truth table of the author is as follows: inserir a descrição da imagem aqui

Then after the application of map k, second author the logic circuit is as follows: inserir a descrição da imagem aqui

Now follow what I DID:

PS: The rest of the output is identical to the author’s! inserir a descrição da imagem aqui

Map K to the exits: inserir a descrição da imagem aqui

What is my difficulty?

  • 1) I did the inverse of the author in relation to the first outputs (A=0 and B=0), because of the statement of the same described above. So what is the problem that is occurring with my truth table?
  • 2) Following question principle (1), why my K map is having problems?
  • 3) What is the correct way to analyze this situation?

1 answer

1


1)In your case, you have arbitrated that if there are no cars passing through any of the streets, the street sign 1 turns green, and the street 2 red. This is no problem. Any combination of values for the truth table is valid.

2) If I understand correctly, you failed to get the expression for Sv2 and Svm1. In this case, and with the convention you have chosen to use, the grouping (In your image, the blue rectangle) you must make contains a single element. You don’t have to group with more than one element. In both cases you will group only the case where A=0 and B=1, returning the expression:

Sv2 = Svm1 = A'B

3)In these cases, where for some cases the end value may be anyone, it is customary to mark with an X, called the term "Don’t Care" [0] (from English, "doesn’t matter"). Thus, when assembling the truth table, you can group them or not as it is most advantageous and generate the shortest expression. In your case, this would allow you to save a grouping in the expression of Sv1 and Svm2, which would be only: Sv1=A In the second and third expression, this allows grouping the upper line, generating the expression:

Sv2 = Svm1 = A'

Doing so would save you some logic ports and decrease the size of the circuit. We conclude with the groupings that the convention used by the author is the most advantageous, and so the circuit of it became so compact. From what you’ve told him, he just didn’t narrate how he came to this choice.


Edit: Improving some points as requested in the comment:

Any grouping you make must group a quantity of elements equal to a power of 2, that is, 1,2,4,8, etc... Grouping a larger amount of elements will always result in a smaller expression. You already did this in your exercise, in the Sv1 table, you grouped a row and a column. You could have erroneously grouped only the line and the other element independently so that the resulting expression would be: Sv1=A+B'A', I mean, a bigger expression. With this defined, if in any of the cases makes no difference the output value being 0 or 1, as when there are no cars on the street, it is good to choose the best value to simplify the expression to the maximum. In the example you quoted: [...]só tinha achado um x e somente um bit 1 do lado dele[...] In this case, X is representing that either the value there is "0" or "1". That is, for the problem in question, it makes no difference how we get out of that situation. It would be useful for us if it were "1", since in this way we could group two elements instead of one, so we grouped 1 with X, because it was advantageous to reduce the expression size. In short: When doing the grouping, the gaps with X can be used for grouping, but need not be included necessarily. Include them in your groupings as advantageous.

About comparing with multiple outputs: Since all outputs depend on the same inputs, they are commonly written in the same table, as extra columns, like the image you posted. They can be interpreted as multiple truth tables written more compactly. To compare the output, each expression found by you will fill a column of the truth table. If the values of a given column match, it means that that output (in this case a green/red light) will react correctly.

[0] - https://en.wikipedia.org/wiki/Don%27t-care_term

    1. I saw in other examples this "Dont care", where on map k had only found an x and only a bit 1 on the side of it, the author put the two together and made an expression. Could you provide more details about it? 2) I would like to test the expression found by it, usually I take the final expression mount the truth table of it and compare it with the original, but in this example how do I do it? For there are several exits
  • 2

    Oops! I edited the answer containing the clarifications you asked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.