Design the following finite state machine (FSM). It has two 1-bit inputs (in1 and in2) and two 1-bit outputs (out1 and out2). The first output (out1) bit should be equal to one if, on both of the last two cycles, in1 and in2 were EQUAL to each other; otherwise, out1 should equal zero. The second output (out2) should be equal to 1 if, on the last cycle, in1 and in2 were NOT EQUAL to each other; otherwise, out2 should equal zero.
Draw a state transition diagram where each state has a unique name that is a string of bits (eg, 00, 01, and 11). Write the associated output and label all the arcs between transitions with the inputs causing them. This must be a Moore machine.
Draw a truth table with both inputs, the current state bits, the outputs, and the next state bits.
State Table
STATE |
PRESENT STATE |
INPUTs |
NEXT STATE |
OUTPUTs |
||||
Q1 |
Q0 |
In2 |
In1 |
Q1+ |
Q0+ |
Out2 |
Out1 |
|
S0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
|
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
|
0 |
0 |
1 |
1 |
1 |
0 |
0 |
0 |
|
S1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
|
0 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
|
0 |
1 |
1 |
1 |
1 |
0 |
1 |
0 |
|
S2 |
1 |
0 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
|
1 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
|
1 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
|
S3 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
|
1 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
|
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
NextState and Output expressions:
Design the following finite state machine (FSM). It has two 1-bit inputs (in1 and in2) and...
Construct a "divisible-by-3" FSM that accepts a binary number entered one bit at a time, most significant bit first, and indicates with a light if the number entered so far is divisible 6. A. Draw a state transition diagram for your FSM indicating the initial state and for which states the light should be turned on. Hint: the FSM has 3 states. B. Construct a truth table for the FSM logic. Inputs include the state bits and the next bit...
A comparator circuit has two 1-bit inputs A and B and three 1-bit outputs G (greater), E (equal), and L (less than). That is, G is 1 if A > B (0 otherwise), E is 1 if A == B (0 otherwise), and L is 1 if A < B (0 otherwise). a. Draw the truth table for a 1-bit comparator (the table has 2 inputs and 3 outputs). b. Implement G, E, and L circuits using only...
Design a 3-bit down counter FSM with no inputs and three outputs. Do this using a T flip flop. a. Draw a state diagram and the corresponding state table. b. Derive the equations for output functions and flip-flop input functions c. Draw the logic circuit diagram
Finite state machine (FSM) counter design: Gray codes have a useful property in that consecutive numbers differ in only a single bit position. Table 1 lists a 3-bit modulo 8 Gray code representing the numbers 0 to 7. Design a 3-bit modulo 8 Gray code counter FSM. a) First design and sketch a 3-bit modulo 8 Gray code counter FSM with no inputs and three outputs, the 3-bit signal Q2:0. (A modulo N counter counts from 0 to N −...
P6 (15 points): The FSM state diagram below has two inputs x1 and xo In addition, it has two DFFS, three 4-to-1 MUXes, a single XOR gate, a single AND gate, and a single output bit Z. Answer the following questions about this FSM. o/0 10/0 RESET A 61/0 C 9/0 01/0 1/0 o1/0 6/0 A: Is this a Moore FSM or a Mealy FSM? B: The state encodings are A-00, B-01, C-10, and D=11. Write a state- assigned table...
Design a state machine that implements the following description: Let’s design a simple controller for an elevator. The elevator can be at one of two floors: first or second. There is a button that controls the elevator (one input), and it has two values: up or down. Also, there are two lights in the elevator that indicate the current floor: blue for first, and yellow for second. At each time step, the controller checks the current floor and current input...
Design a MOORE FINITE STATE MACHINE for a Sequence Detector that detects sequentially the number 1510 in a stream of input bits. Label the input w. The output z is equal to 1 if the number 1510 was detected. After detecting the pattern (1510), the machine goes back in the initial state S0. a) Draw the state diagram for the FSM. Add an asynchronous Reset, active LOW. b) How many FFs do you need to implement this FSM? Note: Label the states S0,...
Problem: Design a clocked synchronous state machine with two inputs A, and B, and a single output Z that is 1 is: .A had the same value at each of the two previous clock ticks, or B has been 1 since the last time that the first condition was true. In-Lab 1. 2. 3. 4. For the finite state machine (FSM), identify the minimum number of states required Draw the state transition diagram Complete the state transition table Derive the...
2. To demonstrate a Mealy state machine, let's design a simple arbiter between two requesting entities. We're going to have two request inputs: reqA and reqB. And two outputs: grantA and grantB. Any combination of requests can be asserted at any time: one of them, both of them, or neither. But at most only one grant can be asserted in any given cycle; if neither request is asserted then neither grant should be asserted. We'll need a state machine to...
4) (3 points) You are asked to design a finite state machine (FSM) to control the tail-light of a 1965 Ford Thunderbird automobile. There are three lights on each side: i) Left: LA, LB, LC; ii) Right: RA, RB, RC. Corresponding to a Left (L) or a Right (R) turn signal, the flashing sequence is as shown in the figure below. [For example, when the left turn signal is activated, all the lights are off, then LA turns on, then...