Question

Why should you not implement a while loop in a FSM state?

Why should you not implement a while loop in a FSM state?

Homework Answers

Answer #1

In Finite State Machine, there is transition from one state to another based on some input.

Finite State machine can only look at the input and not the count of input symbol since it doesn't have stack or tape to store symbol.

While loop is used to count symbol and should terminate when condition holds False ie a particular count is reached.

FSM doesn't have provision to keep count of input symbol and thus while loop cannot be used in FSM.

If you have any questions comment down. Please don't simply downvote and leave. If you are satisfied with answer, please? upvote thanks

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
FSM: Sequence 00,01,11,10 Example A complete FSM is constructed by combining the next state function and...
FSM: Sequence 00,01,11,10 Example A complete FSM is constructed by combining the next state function and D flip-flops. This exercise provides the next_pattern, the dff module, and the fsm module. Only the next_pattern has to be completed. Complete the next_pattern module, that provides the next state table for a sequence generator. The sequence is 00, 01, 11, and 10. The reset state is 00. 0001111000011110 The dff module provides a positive edge trigger D flip-flop with a specified reset state...
Describe a scenario in which a programmer might find it most appropriate to implement a for-loop....
Describe a scenario in which a programmer might find it most appropriate to implement a for-loop. Describe a scenario in which a programmer might find it most appropriate to implement a while loop. Describe a scenario in which a programmer might find it most appropriate to implement a do while loop. could you answer these questions
Implement function q1w so that it is just like q1 but uses a while loop instead...
Implement function q1w so that it is just like q1 but uses a while loop instead of a for loop. def q1(inputString, inputDict, specialValue): s = 0 s2 = 0 a = 0.0 for char in inputString: s = s + inputDict[char] if inputDict[char] == specialValue: s2 = s2 + 1 a = s / len(inputString) return (a, s2)
I need to implement the following while loop in assembly: i = 1; while (i <=...
I need to implement the following while loop in assembly: i = 1; while (i <= 50) { A[i] = i; i++; } With the array of integers A stored at memory location x+200, where x is the address of the memory location where the assembly program is loaded. I can only use following commands; LOAD, STORE, ARITHMETIC (ADD, SUB, MUL, DIV, INC), SKIP, BRANCHING (BLT, BGT, BLEQ, BGEQ, BEQ), READ and WRITE, and HALT
Implement the finite state machine for an answering machine using LabVIEW. Please send me the .vi...
Implement the finite state machine for an answering machine using LabVIEW. Please send me the .vi file, and a report in pdf or word format. Explain FSM in your report, include screen shots of the FSM from LabVIEW, assigned inputs, and resulted outputs.
What are the semantic differences between a for loop and a while loop? Can you convert...
What are the semantic differences between a for loop and a while loop? Can you convert a while loop to an equivalent for loop and vice versa? If so, how? Java
Design a FSM for a Vending Machine In this task, you will design a FSM for...
Design a FSM for a Vending Machine In this task, you will design a FSM for a simple (albeit strange) vending machine of office supplies. The vending machine sells three possible items, each at a different cost: Item Cost Pencil 10 cents Eraser 20 cents Pen 30 cents The vending machines accepts nickels (worth 5 cents), dimes (worth 10 cents), and quarters (worth 25 cents). Physically, it is only possible to insert a single coin at a time. The vending...
We want to design a non-resetting sequence detector using a finite state machine (FSM) with one...
We want to design a non-resetting sequence detector using a finite state machine (FSM) with one input X and one output Y. The FSM asserts its output Y when it recognizes the following input bit sequence: "1101". The machine will keep checking for the proper bit sequence and does not reset to the initial state after it has recognized the string. [Note: As an example the input string X= "..1101101.." will cause the output to go high twice: Y =...
Implement a function that detects if there is a “loop” in a singly linked list. A...
Implement a function that detects if there is a “loop” in a singly linked list. A “loop” is defined as a link from one node to itself or to another node that is before the node in the list. The function may only make one pass through the list. It must return 1 if a “loop” exists; 0 otherwise. Be sure to test your function! You may start with code that you have written for other labs. This is a...
Can you rewrite this MATLAB code using a while loop instead of a for loop? %formatting...
Can you rewrite this MATLAB code using a while loop instead of a for loop? %formatting clc, clear, format compact; %define variables k=1; b=-2; x=-1; y=-2; %while loop initialization for k <= 3 disp([num2str(k), ' ',num2str(b),' ',num2str(x),' ',num2str(y),]); y = x^2 -3; if y< b b = y; end x = x+1; k = k+1; end