Need Help: Programming a truth table to control LEDs

At successive increments of time I need to light LEDs in accordance with two or more “truth tables”. As the attached image shows, depending on which condition is met, A or B, I need the value of “x” to change in accordance with the sets of data shown in Condition A or Condition B depending on an external event.

Thanks -Scott


That table tells me nothing. A real truth table will give the value of x for all the input combinations of A and B, like this:


If the truth table is going to be different for each case, you need to provide one full table for each case. Then we can help you calculate X.