# Is there a way to reduce inputs or tables

well I'm working on 4 way traffic light project with pedestrian signals which professor give to me. First I started with defining the problem and figuring out how many states I need. So I came to conclusion that I need 8 states but there are 20 input output variables(or whatever they are called). And I get stucked, I don't know what to do next ? In school we learned that when working with flip-flop counter if we have 3 input variables then we will have 8 different states, but now I have 20 input variables which means I would have just over one milion states. And also we learned about decoder, in that case table will be more or less the same but I will have 20 K-maps (since there are 20 input variables, right ?).

So my questions is: Is there any way where I can reduce numbers of states when assigning to flip-flop or should I use decoder for that ?

• @12Lappie I think I'm getting this all wrong. Well it is not 20 input variables it is output variables, since one of them needs to be 1 to be red on traffic lights. Decoder will help now ? Mar 7, 2017 at 20:37
• You may be able to combine some inputs - for the pedestrian inputs, if you have signals for "north side, eastbound", "north side, westbound", and similar for south side, you can combine those four signals into one input for your logic. Likewise for northbound/southbound. Mar 7, 2017 at 20:40
• @Steve Hmm, I can't figure out what is the right "formula" of that Mar 7, 2017 at 20:41
• @PeterBennett I edited my question, my bad. Its outputs Mar 7, 2017 at 20:43
• Bud, relax, sit down and do it yourself... Define the inputs. Next define the outputs. Now add a clock (what is the shortest transition or sampling period.) Share these with us and we will assist if you get stuck. Mar 7, 2017 at 20:44