closed by
1,435 views
1 votes
1 votes

A traffic signal cycles from RED to YELLOW, YELLOW to GREEN and GREEN to RED. In each cycle RED is turned for 100 seconds, YELLOW is turned for 40 seconds and GREEN is turned for 80 seconds. The traffic has to be implemented using FSM. The only input to this FSM is a clock of 10 second period. The minimum number of flip-flops required to implement this FSM is?

 


I know that this is asked earlier in GO but still I have doubt

My solution :

RED is turned for 100 sec , YELLOW is turned for 40 sec and GREEN is turned for 80 sec

CLK period  = 10 sec

 No of flip flop required to count  = 100 / 10 = 10  [ 4 flip flops]

No of flip flops required to count = 40 /10 = 4   [2 FF]

No of flip flops required to count  = 80 /10  = [3FF]

Now there are 3  states RED , GREEN , YELLOW

count is like that

sequence is like this

0 – > 1 – > 2 → 3- >4 → ...->9 – > 0 – > 1 → 2 – >3 ->0 >1 → ..->7

3 different states → no of flip flops required = 2

4+ 2  = 6 FF required

 

closed by