Combinational or Sequential

Thread Starter

zulfi100

Joined Jun 7, 2012
633
Hi,

I have got a following question:

A computer game generates ‘1s’ and ‘0s’. These are associated with awards. The first ‘1’ (i.e. the first '1' obtained by continuously running the program several times such that each execution generates a 1 output) results in 4 awards but the remaining 1’s do not result in any award. On the other hand, each odd numbered '0' results in 2 awards and each even numbered '0' does not get any award. For the output 011100001011.. of executions results in awards 2400202024240……

Is the above activity mentioned in the game, combinational or it must be sequential?


Ans: Its sequential because we have to keep the count of 0s whether they are odd or not.

Some body please guide me, if answer is correct or not.

Zulfi.
 

WBahn

Joined Mar 31, 2012
26,148
It's sequential, but not because you have to keep track of odd and even zeroes, it's because you don't have all of the data at one time -- you get the result of each game one at a time. Also, if it were combinatorial, how many inputs do you need? You have no idea how many times the game will be run. What if it is run one million times?

IF you knew that there would be exactly sixteen games (just picking a value) and IF you would have the results of each of the sixteen games all at the same time, THEN you could most definitely design a combinatorial circuit to yield the awards associated with each game. You could even do it if there were an unknown number of games but a fixed cap on that number (say, no more than 64 games) and there were some way to indicate to the circuit how many actual games were played.

But the sequential circuit to evaluate this is very simple -- it's a straight forward finite state machine.
 

Thread Starter

zulfi100

Joined Jun 7, 2012
633
Hi,
Thanks. I think the answer is combination of answers of both of you guys. For an infinite sized string we can't have both sequential and combinational ckts. For finite sized string we can have sequential ckts. But if the size of the string is known in advance we can have a combinational ckt as well.

Zulfi.
 
Top