The Wayback Machine - https://web.archive.org/web/20240930194832/https://www.geeksforgeeks.org/design-101-sequence-detector-mealy-machine/
Open In App

Design 101 sequence detector (Mealy machine)

Last Updated : 01 Apr, 2021
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Prerequisite – Mealy and Moore machines 
A sequence detector is a sequential state machine that takes an input string of bits and generates an output 1 whenever the target sequence has been detected. In a Mealy machine, output depends on the present state and the external input (x). Hence, in the diagram, the output is written outside the states, along with inputs. Sequence detector is of two types: 
 

  1. Overlapping
  2. Non-Overlapping

In an overlapping sequence detector, the last bit of one sequence becomes the first bit of the next sequence. However, in a non-overlapping sequence detector, the last bit of one sequence does not become the first bit of the next sequence. In this post, we’ll discuss the design procedure for non-overlapping 101 Mealy sequence detectors. 
 

Examples: 

For non overlapping case
Input :0110101011001
Output:0000100010000

For overlapping case
Input :0110101011001
Output:0000101010000

The steps to design a non-overlapping 101 Mealy sequence detectors are: 
 

Step 1: Develop the state diagram – 
The state diagram of a Mealy machine for a 101 sequence detector is: 

 

Step 2: Code Assignment – 

Rule 1 : States having the same next states for a given input condition should have adjacent assignments. 
Rule 2: States that are the next states to a single state must be given adjacent assignments. 
Rule 1 given preference over Rule 2. 

 

The state diagram after the code assignment is: 

 

Step 3: Make Present State/Next State table – 
We’ll use D-Flip Flops for design purposes. 

 

Step 4: Draw K-maps for Dx, Dy and output (Z) – 

 

Step 5: Finally implement the circuit – 

 

This is the final circuit for a Mealy 101 non-overlapping sequence detector.
 


Previous Article
Next Article

Similar Reads

Design counter for given sequence
A Counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock signal. Counters are used in digital electronics for counting purpose, they can count specific event happening in the circuit. For example, in UP counter a counter increases count for every ris
3 min read
Why K-Map Has States in Sequence of 00, 01, 11, 10 Instead of 00, 01, 10, 11?
Boolean function minimization is an essential part of digital logic. K-Map is one of the important methods for Boolean function minimization. In this article, we will learn about why the K-Map uses sequence 00, 01, 11, 10 instead of 00, 01, 10,11. K-Map is the basic method for the Boolean function minimization which eliminates the redundant terms i
5 min read
Analysis and Design of Combinational and Sequential circuits
1. Analysis and Design of Combinational circuits: To design of combinational circuits, the procedure involves the following steps: Find the required number of inputs and outputs and assign a symbol to each. Derive the truth table according to given specifications and function. Using the truth table, obtain simplified Boolean functions for each outp
2 min read
Design of 512x8 RAM using 128x8 RAM
If we see RAM physically then we notice that RAM is made up of a few chips. We can design the required RAM size using basic RAM chips. We can observe a basic RAM chip as follows: CS1: For chip select 1, the value should be 1CS2: For chip select 2, the value should be 0. Read and Write: Used for upcoming signals. If we have n bit address and m bit w
3 min read
Design Mod - N synchronous Counter
The value of N can be different from power of 2. Also, the counting sequence may be random for example some cyclic code (8421, 2423 etc). The following method is applied for designing for mod N and any counting sequence. Design for Mod-N counter :The steps for the design are - Step 1 : Decision for number of flip-flops -Example : If we are designin
3 min read
What is One Hot Design?
In the field of computer science and electronics, there are some methods, which are used to represent data in such a way, so that it can be used in machines and computers. These methods are called encoding schemes. One- hot encoding is one of those methods. In this article, we will be discussing one-hot encoding, it's working, the applications, etc
6 min read
List of “Difference Between” Digital Logic and Design Topics
Digital Logic and Design are the main part of ultramodern electronic systems which enable the structure of complex circuits that power our world of digital and technology. This is a system in computers that uses simple values to produce I/ O operations. These distinctions include sense gates, circuit designs, and design approaches, and They have a
4 min read
Digital Logic and Design - GATE CSE Previous Year Questions
Solving GATE Previous Year's Questions (PYQs) not only clears the concepts but also helps to gain flexibility, speed, accuracy, and understanding of the level of questions generally asked in the GATE exam, and that eventually helps you to gain good marks in the examination. Previous Year Questions help a candidate practice and revise for GATE, whic
4 min read
Digital Logic Design - Quiz Questions
Digital Logic Design is an important part in the field of Electrical and Electronics Engineering. Mastering this subject requires not only good theory knowledge but also learning practical applications. This Digital Logic Design Quiz is designed to test your fundamental understanding of Digital Logic Design. The quiz covers a wide range of topics r
15+ min read
Design asynchronous Up/Down counter
Asynchronous counters are a kind of digital circuitry which may count either upwards or downwards while not adhering to the timing pulses from an oscillator. As a result, state transitions are determined by extra inputs rather than by time frames at fixed intervals. The flip-flops and logic gates are utilized for designing the asynchronous counter
9 min read
Counter Design using verilog HDL
Designing a counter in Verilog means creating a circuit that changes its value (either increasing or decreasing) with each clock pulse. What is Counter?A counter is a logic circuit that counts the incidences of particular events; it is identified traditionally by the frequencies of a clock pulse. Counters are employed in digital electronics in orde
6 min read
Multiplexer Design using Verilog HDL
The Verilog Hardware Description Language is an important language in the world of digital design where electronic systems are modeled using it. It provides a way of describing and simulating both the behavior and structure of digital circuits; hence, it is an important tool for engineers in hardware design and verification. Verilog HDL provides fo
7 min read
XNOR Gate
In digital electronics, the XNOR gate is a type of logic gate used to perform an exclusive NOR gate. It is a special type of logic gate used in digital circuits. An XNOR gate, also known as an equivalence gate or an EX-NOR gate, is a digital logic gate that outputs true (1) when an even number of true inputs are present. It produces a true output i
10 min read
SR Flip Flop
In this article, we will go through SR Flip Flop, we will start our article with the definition and construction of the flip-flip, and then we will go through its Basic Block Diagram with its working and characteristic block diagram, at last, we will conclude our article with its applications. Table of Content SR Flip FlopConstruction Basic Block D
5 min read
Boolean Algebra
Boolean algebra is a type of algebra that is created by operating the binary system. In the year 1854, George Boole, an English mathematician, proposed this algebra. This is a variant of Aristotle's propositional logic that uses the symbols 0 and 1, or True and False. Boolean algebra is concerned with binary variables and logic operations. Boolean
14 min read
Difference between Half Adder and Full Adder
In this article, we will go through the Difference between the Half adder and Full adder, First, we will briefly describe what is half and full adders with their logical expressions and truth table, and then we will go through their differences between them, At last we will conclude our article with some FAQs. Table of Content What is Half Adder?Wh
6 min read
4-bit binary Adder-Subtractor
In Digital Circuits, A Binary Adder-Subtractor is capable of both the addition and subtraction of binary numbers in one circuit itself. The operation is performed depending on the binary value the control signal holds. It is one of the components of the ALU (Arithmetic Logic Unit). This Circuit Requires prerequisite knowledge of Exor Gate, Binary A
3 min read
Latches in Digital Logic
Latch is a digital circuit which converts its output according to its inputs instantly. To implement latches, we use different logic gates. In this article, we will see the definition of latches, latch types like SR, gated SR, D, gated D, JK and T with its truth table and diagrams and advantages and disadvantages of latch. Table of Content What are
7 min read
IEEE Standard 754 Floating Point Numbers
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation which was established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating point implementations that made them difficult to use reliably and reduced
5 min read
Shift Registers in Digital Logic
Pre-Requisite: Flip-Flops Flip flops can be used to store a single bit of binary data (1 or 0). However, in order to store multiple bits of data, we need multiple flip-flops. N flip flops are to be connected in order to store n bits of data. A Register is a device that is used to store such information. It is a group of flip-flops connected in seri
8 min read
Magnitude Comparator in Digital Logic
A magnitude digital Comparator is a combinational circuit that compares two digital or binary numbers in order to find out whether one binary number is equal, less than, or greater than the other binary number. We logically design a circuit for which we will have two inputs one for A and the other for B and have three output terminals, one for A
7 min read
Carry Look-Ahead Adder
The adder produce carry propagation delay while performing other arithmetic operations like multiplication and divisions as it uses several additions or subtraction steps. This is a major problem for the adder and hence improving the speed of addition will improve the speed of all other arithmetic operations. Hence reducing the carry propagation de
5 min read
Encoder in Digital Logic
An encoder is a digital circuit that converts a set of binary inputs into a unique binary code. The binary code represents the position of the input and is used to identify the specific input that is active. Encoders are commonly used in digital systems to convert a parallel set of inputs into a serial code. The basic principle of an encoder is to
7 min read
Full Subtractor in Digital Logic
A full subtractor is a combinational circuit that performs subtraction of two bits, one is minuend and other is subtrahend, taking into account borrow of the previous adjacent lower minuend bit. This circuit has three inputs and two outputs. The three inputs A, B and Bin, denote the minuend, subtrahend, and previous borrow, respectively. The two ou
3 min read
Program for Decimal to Binary Conversion
Given a decimal number as input, we need to write a program to convert the given decimal number into an equivalent binary number. Examples of Decimal to Binary:  Input : 7Output : 111Input : 10Output : 1010Input: 33Output: 100001Recommended PracticeDecimal to binaryTry It!Brute force ApproachFor Example: If the decimal number is 10. Step 1: Remaind
15+ min read
Full Adder in Digital Logic
Full Adder is the adder that adds three inputs and produces two outputs. The first two inputs are A and B and the third input is an input carry as C-IN. The output carry is designated as C-OUT and the normal output is designated as S which is SUM. The C-OUT is also known as the majority 1's detector, whose output goes high when more than one input
5 min read
Multiplexers in Digital Logic
In this article we will go through the multiplexer, we will first define what is a multiplexer then we will go through its types which are 2x1 and 4x1, then we will go through the Implementation of the 2x1 mux and higher mux with lower order mux, At last we will conclude our article with some applications, advantages and some FAQs. Table of Content
11 min read
Flip-Flop types, their Conversion and Applications
In this article, we will go through the Flip-Flop types, their Conversion and their Applications, First, we will go through the definition of the flip-flop with its types in brief, and then we will go through the conversion of the flip-flop with its applications, At last, we will conclude our article with some FAQs. Table of Content Flip-FlopTypes
7 min read
Introduction of K-Map (Karnaugh Map)
In many digital circuits and practical problems, we need to find expressions with minimum variables. We can minimize Boolean expressions of 3, 4 variables very easily using K-map without using any Boolean algebra theorems. K-map can take two forms: Sum of product (SOP) Product of Sum (POS) According to the need of problem. K-map is a table-like rep
3 min read
Half Adder in Digital Logic
A half adder is a digital logic circuit that performs binary addition of two single-bit binary numbers. It has two inputs, A and B, and two outputs, SUM and CARRY. The SUM output is the least significant bit (LSB) of the result, while the CARRY output is the most significant bit (MSB) of the result, indicating whether there was a carry-over from th
4 min read
Article Tags :