Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hint: calculating the remainder is not the way to go. you have to think of a pattern. I have said too much already...
The triangle on left is the input.
Follow the states as the bits come, lsb first.
so 101 (that is, 5), 1 (1's place) brings you to q1
0 (2's place) brings you to q4
1 (4's place) brings you to q0- no remainder
try a few other numbers and see how it works
I'm asking how one can come up with the fsm. If someone knows, please help me understand.
could you please be more specific and explain? I have already tried to figure out for some time now
I think the OP is asking for a detailed explanation of the state transitions, in words (when in 0 in input in state1, goto state2, etc....)
and last questionthat's one questionNo I'm asking how you can come up with the fsm.
second questionIf you are asked to create an fsm, how would you do it?
for msb first, we use the states to remember what remainder we are at for each new bit we get.
statement
for lsb first, what is the strategy?
and last question
so you want to know how to go about the process of creating the state diagram you provided.
off hand, it takes a fair amount of thought, trial and error, and probably a lot of banging the head against the wall.
reference: see Franz Kafka's "Conversation with the Supplicant"
i.e. you have to put in the work.
I guess no one knows how to arrive at the solution other than through trial and error?
No, not by trial and error.
Write down a bunch of binary values of values starting with 5,15,25,35, etc. All values that are even can be shifted till a 1 is in the LSB to check for divisible by 5. e.g. 1010 => 101 (5) 0 (dropped)
As you don't seem to be making that much of an effort to determine if there is a pattern to this I will stop at this point and let you make an effort to do what I've said and start looking for those unique divisible by 5 bit patterns.
No, not by trial and error.
Write down a bunch of binary values of values starting with 5,15,25,35, etc. All values that are even can be shifted till a 1 is in the LSB to check for divisible by 5. e.g. 1010 => 101 (5) 0 (dropped)
As you don't seem to be making that much of an effort to determine if there is a pattern to this I will stop at this point and let you make an effort to do what I've said and start looking for those unique divisible by 5 bit patterns.
I must protest at this ignorant comment of yours.I guess no one knows how to arrive at the solution other than through trial and error?