0% found this document useful (0 votes)
5 views

DLD LAB # 13

The document outlines an experiment focused on the implementation and design of Mealy and Moore machines, which are types of finite state machines (FSM). It details the objectives, equipment, and steps for designing FSMs, including a specific task to create a sequence detector using a Mealy machine. The conclusion emphasizes the applications of these machines in various electronic systems, such as vending machines and traffic light controls.

Uploaded by

mubeenyaqub554
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

DLD LAB # 13

The document outlines an experiment focused on the implementation and design of Mealy and Moore machines, which are types of finite state machines (FSM). It details the objectives, equipment, and steps for designing FSMs, including a specific task to create a sequence detector using a Mealy machine. The conclusion emphasizes the applications of these machines in various electronic systems, such as vending machines and traffic light controls.

Uploaded by

mubeenyaqub554
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

TITLE:

Implementation and Designing of Mealy and


Moore Machine.

DLD LAB: #13

DEPT: CS-03

DATE OF EXPERIMENT: 24/5/23

GROUP MEMBERS
NAME:

RIJA MOBIN IFRAH JANNAT EMAN SHAHID

REG NO:
37 40 44
Objective:
• Encourage students to understand the concepts of Finite State Machine (specifically Mealy
and Moore
types).
• Create and construct a sequential circuit by utilizing the principles of FSM.

Equipment:
 Logic gates IC
 Flip flops IC.
 Connecting wires.
 Digital logic trainer.

Introduction:
Finite state machine:
A computational model consists of a set of states, a starting state, an input alphabet, and a
transition function. This model operates by processing an input string, starting from the initial
state, and transitioning to new states based on the specified transition function. There are
different variations of this model, such as machines that associate actions or outputs with
transitions (Mealy machine) or this model, such as machines that associate actions or outputs
with transitions (Mealy machine) or states (Moore machine), machines with multiple starting
states, transitions that occur without input symbols (null transitions), or multiple transitions
for a given symbol and state (nondeterministic finite state machine). Additionally, these
machines may have one or more states designated as accepting states for specific purposes,
such as recognition.

Moore machines:
Moore machines are a type of finite state machine that has an output associated with each
state. The output value of a Moore machine depends solely on the current state it is in. A
Moore machine can be defined by several components.
 It has a finite set of states, denoted by Q.
 It also has an initial state, q0.
 The machine operates on an input alphabet, represented by Σ, and produces output values
from an output alphabet.
 The transition function, denoted by δ, maps a combination of a state and an input symbol
to a new state.
 Finally, the output function, denoted by λ, maps each state to an output value.

In the Moore machine illustrated in the given figure, the output is associated with each
input state and is separated by a forward slash (/). The length of the output for a Moore
machine is one more than the length of the input. For example, when the input is “11”, the
machine undergoes the following transitions:
1. starting from state q0 with input 1, it transitions to state q2, and since there is no further
input, it remains in q2.
 The corresponding output for this input sequence is “000”, where the first 0 represents
the output for state q0, the second 0 represents the output for state q2, and the third 0
again represents the output for state q2.

Mealy machines:
Mealy machines are another type of finite state machine that includes an output value
associated with each transition. The output value of a Mealy machine depends on both the
current state and the input symbol at that particular moment. A Mealy machine can be
defined using several components.
 Firstly, it consists of a finite set of states denoted by Q.
 It also has an initial state, q0.
 The machine operates on an input alphabet represented by Σ and produces output values
from an output alphabet.
 The transition function, denoted by δ, maps a combination of a state and an input symbol
to a new state.
 Lastly, the output function, denoted by λ, maps a combination of a state and an input
symbol to an output value
In the depicted Mealy machine, the output is associated with each input symbol for each state
and is separated by a forward slash (/). The length of the output for a Mealy machine is equal
to the length of the input.
For instance, when the input is “11”, the machine undergoes the following transitions: starting
from state q0 with input symbol 1, it transitions to state q2, and the corresponding output for
this transition is 0. Then, from state q2 with input symbol 1 again, it remains in q2, and the
associated output for this transition is also 0.
Thus, the resulting output for this input sequence is “00”, where the first 0 represents the
output for the transition from state q0 to q2, and the second 0 represents the output for the
transition from state q2 to q2.

Steps of Designing FSM:


Here are the simplified steps for designing a Finite State Machine (FSM):
1. Understand the desired operation and requirements.
2. Create a diagram that shows the different states and transitions.
3. Simplify the diagram by reducing the number of states if needed.
4. Assign binary values to each state.
5. Create a table that represents the transitions between states using binary codes.
6. Decide on the type of flip-flops to be used.
7. Determine the simplified equations for the input and output of the flip-flops.
8. Draw a logic diagram that illustrates the required logic for the FSM.

TASK RESULT
TASK1:
Design a sequence detector which detect 101.
Conditions are as:
You have to using Mealy state machine.
If it gets sequence like 1101101 it should detect it twice. (means
overlapping allowed).
When the sequence is detected it show 1 else 0.
You have to use D flip flop IC (7474) for this task.
Procedure:
1. Take two D flipflop ICs.
2. Connect toggle input to D input of first flipflop and also to a NOT gate.
3. Give a clock input to CLK of both flipflop ICs.
4. Connect output Q of first flipflop and output of NOT gate to an AND gate and connect its
output as an input of an OR gate.
5. Give 3 inputs, one of Q’ which is output of first flipflop, second of Q which id output of
second flipflop, and third of toggle.
6. Now attach its output as input as second input of OR gate and give its output as input at D
of second flipflop.
7. Connect output Q of both flipflops to an AND gate and connect its output to an LED.
8. We verified it and provided the sequence 101 for which the output should be 1(LED should
be ON) but as there were no faults after providing the correct sequence we checked, the LED
was ON.
101 Pattern Overlapping by Mealy and Moore
Machine:

Moore Overlapping State Table:

Mealy Overlapping State Table:

Mealy 101 Sequence detector Truth Table for


Overlapping Case:
CONCLUSION:
Mealy and Moore machines find wide application in various sequential logic systems,
serving as effective tools for controlling and simulating the behavior of electronic
devices such as counters. These machines play a crucial role in the design of vending
machines, where inputs can be mapped to button presses and outputs can result in
product dispensing, among other actions. Similarly, they are instrumental in the
development of traffic light control systems, where the transitions between traffic
lights and their timing depend on inputs from sensors, traffic demands, and other
factors.

You might also like