I want to create this truth table: truth table

So I tried this but I was not able to get the last row, which is: While a =1 and b =1 ,yellow = 1 red = 0 and green = 0.
This is my design for it, but I could not make the last row.

enter image description here

Does anyone have a sample or a tip about what I can do to fix this?

  • \$\begingroup\$ I remember doing a traffic light problem like this in one of my school labs. \$\endgroup\$ – user4574 Apr 15 at 13:14
  • \$\begingroup\$ @user4574 yep it is one of my assignments \$\endgroup\$ – John wiliam Apr 15 at 18:14

YELLOW = \$B\$.

RED = \$\bar A\$.

GREEN = \$\overline {RED + YELLOW}\$

enter image description here

Purple is the implied logic for the red light, orange is the implied logic for the yellow light and green is for the green light.

One OR gate and two inverters would do the trick.

  • \$\begingroup\$ thanks i do not know know much about the gates i i were trying too much things thanks for helping :) i solve it \$\endgroup\$ – John wiliam Apr 15 at 11:59

You can write the equations easily from the truth table

$$Red = \bar A $$ $$Yellow = B$$ $$Green = A \land \bar B$$

They can be built the following circuit: enter image description here

  • 1
    \$\begingroup\$ thanks for the picture :) \$\endgroup\$ – John wiliam Apr 15 at 12:00

I do have a tip for you!

Work column by column, not row by row. First, create a circuit for the red light, ignoring the other two lights. Next, do the same for the yellow light. Finally, do the same for the green light. After you've created these three circuits, you can simply combine them into one.

  • \$\begingroup\$ thanks for the advice :) \$\endgroup\$ – John wiliam Apr 15 at 18:13

I will be honest and say, i am not all that good at designing logic diagrams, way too long since i had it in school. But there is one thing i remember: Logic Friday. Its a freeware program that is an immense help when designing such diagrams and solving the equations. Using Logic Friday, i got these results:

A - input 1

B - input 2

F3 - red

F4 - yellow

F5 - green

Logic input gave me this truthtable after minimizing:

F3 = A';

F4 = B;

F5 = A B';

And this diagram followed:

Logic diagram

I know a program like this is no substitute for real knowledge, but it works for a home fiddler like me.

Good luck :)

  • \$\begingroup\$ thanks for the help :) \$\endgroup\$ – John wiliam Apr 16 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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