Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a classic problem, a farmer, a fox, a chicken and a sack of corn are on the left bank of a river. There is

image text in transcribed
In a classic problem, a farmer, a fox, a chicken and a sack of corn are on the left bank of a river. There is a small boat that will hold the farmer and at most one of the other three. Using as many trips as needed, the farmer must transfer the other three and himself to the right bank of the river. However, if he leaves the fox and chicken on one bank of the river while he is on the other bank, the fox will eat the chicken. Likewise, if he is on one bank and the chicken and corn are on the other bank, the chicken will cat the corn. Design a finite state machine using combinatorial logic to simulate this situation. Each state value has four bits A, B, C, D representing the farmer, fox, chicken and corn, respectively. Each bit is o if its item is on the left bank and 1 if it is on the right bank. Two input bits, YZ, encode the action YZ Action Farmer crosses the river alone Farmer crosses the river with the fox 01 Farmer crosses the river with the chicken 10 Farmer crosses the river with the corn There are two outputs. Output L is set to 1 whenever the fox eats the chicken or the chicken eats the corn. Output W is set to 1 when all four reach the right bank of the river. Otherwise the outputs are zero. When either L-1 or W the machine resets to the state 0000 on the next clock cycle. Unused states are "Don't Cares". Only show equations do not draw circuit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions