Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
State Reduction and State Assignment
Next article icon

State Reduction and State Assignment

Last Updated : 13 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

To illustrate the process of state reduction and state assignment first we have to know the concepts of the state diagram, state table, and state equation. In this article, we are going to learn all the topics related to state reduction and assignment.

What is State Diagram?

The state graph or state diagram is a pictorial representation of the relationships between the present state, the input state, the next state, and the output state of a sequential circuit i.e. A state diagram is a graphical representation of a sequential circuit's behavior.

Example: Consider an excitation table of J-K flip-flop 

QnQn+1JK
000x
011x
10x1
11x0

The state diagram of the above table is 

State Diagram of J-K flip-flop
State Diagram of J-K flip-flop 

What is State Table?

Even though the behavior of a sequential circuit can be conveniently described using a state diagram, for its implementation the information contained in the state diagram is to be translated into a state table. The tabular form of the state diagram is the state table. The present state, the next state, and the output are the three sections of the diagram.

The State Table of JK flip-flop is                                         

InputsPresent stateOutput
JKQ

Q+ 

(Output)

0000
0011
0100
0110
1001
1011
1101
1110

State equation: Qn+1 = Qn bar J + Qn K bar

What is State Reduction?

The state reduction technique generally prevents the addition of duplicate states. The reduction in redundant states reduces the number of flip-flops and logic gates,  reducing the cost of the final circuit. Two states are said to be equivalent if every possible set of inputs generates exactly the same output and the same next state. When two states are equal, one of them can be eliminated without changing the input-output relationship. The state reduction algorithm is applied in the state table to reduce equivalent states.

Advantages of State Reduction

  • Reduced Complexity: Lesser number of states result in a reduced complexity of circuits with lesser flip-flops and logic gates.
  • Cost Efficiency: Overall cost of the circuit is diminished because of the decision taken for the simplified design.
  • Improved Performance: Increased throughput among other features such as low power consumption.

Disadvantages of State Reduction

  • Design Time: State reduction may take more time to analyze and compute the data as compared to analyzing the parameter trajectory directly.
  • Potential Information Loss: It thus requires precaution so that none of the important information is overlooked during the reduction process.

What is State Assignment?

State assignment refers to the process of assigning binary values to the states of a sequential machine. The binary values should be given to the states in such a way that flip-flop input functions may be implemented with a minimum number of logic gates.

Types of State Assignment Techniques

  • Binary Assignment: Gives binary numbers to states on one-to-one basis. This is clear and properly executable yet it may sometimes lead to the creation of an utmost low logical condition.
  • Gray Code Assignment: It utilizes Gray codes to bring about minimum change of transition between the states hence reducing the chances of getting glitches in the logic.
  • One-Hot Assignment: Conveys each value that specifies a state by means of a specific position of the bits, in which only the one is set to 1. This makes the combinational logic simpler but at a cost of more numbers of flip-flops.

State Assignment rules are as follows

Rule 1: States having the same next state for a given input condition should have assignments that can be grouped into logically adjacent cells in a K-map. 

Rule 2: States that are the next states of a single state should have assignments that can be grouped into logically adjacent cells in a K-map.

Example 1: To explain the concept of state reduction let us consider the state table as 

Present stateNext stateOutput
X=0X=1X=0X=1
aab00
bcd00
cad00
def01
eaf01
fgf01
gaf01

The state diagram for the above state table is 

State diagram before reduction
State diagram before reduction

Step1: First here we are supposed to identify two or more similar states in the next state and output state. In the above table if we observe states of e and g are having the same next state and output values for all combinations of input i.e. X=0 and X=1.

So eliminate the g state in the state table and wherever g is present replace it with e. Because e and g both are the same i.e. e=g.  

Present stateNext stateOutput
X=0X=1X=0X=1
aab00
bcd00
cad00
def01
eaf01
fe(g=e)f01

Step 2: Again check if any two states have similar values or not. If any two states have the same next state and output then eliminate one state. 

Here d and f are having the same next state value and output. So eliminate f and wherever f is present replace it with d. Because both are the same d=f 

Present stateNext stateOutput
X=0X=1X=0X=1
aab00
bcd00
cad00
ded(d=f)01
ead(d=f)01

Step 3: Further observe if any similar states are present or not. The states c and e are having same next states but they are having different outputs. So we can not consider it a reduction state. 

State diagram After reduction

Step 4:  If you observed the state table, the states are represented by using the alphabet. We can not proceed further if we are having alphabets, so, assigning binary numbers to alphabets is called a state assignment.  

To assign binary numbers to the state we have to consider the minimum number of bits. 

The codes must contain n bits for a circuit with m states, where 2n >= m. In this case, each state requires 23 >=5=>3 bits to be represented. With three bits, there are eight possible combinations, of which five can be used to represent the states. 

StateAssignment 1 
Binary
a000
b001
c010
d011
e100

Step 5: Replacing the alphabets with binary numbers.  

Present stateNext stateOutput
X=0X=1X=0X=1
00000000100
00101001100
01000001100
01110001101
10000001101

Advantages of State Assignment

  • Minimized Logic Gates: Pre allocation of states on the hardware component can also have an impact of minimizing the number of logic gates in use.
  • Simplified Implementation: Some of the state assignment techniques such as Gray coding and one-hot encoding are beneficial in simplifying the circuit design and also improving on the errors that might be present.

Disadvantages of State Assignment

  • Increased Flip-Flops: Some of these techniques such as one-hot encoding may need more flip-flops as compared to other techniques.
  • Complexity in Assignment: Deciding on which state should be assigned to an AP can be a challenging task and requires sometimes even a huge amount of time.

Conclusion

State reduction and state assignment are very useful in the design of the sequential circuits. State reduction enable fewer numbers of states hence easier in the design of the circuit than state assignment which optimizes the binary form of the states in order to reduce complexity of the circuit. By doing so, these techniques will enable designers to come up with better and more efficient cost-effective digital systems.


Next Article
State Reduction and State Assignment

L

laxmigangarajula03
Improve
Article Tags :
  • Computer Subject
  • Digital Logic

Similar Reads

    Introduction of Algorithmic State Machines (ASMs)
    Introduction : In digital systems, the binary information is divided into data and control information.Data information is manipulated by various operations like arithmetic, shift, and logic. These operations are implemented by multiplexers, decoders, counters, and shift registers.Control informatio
    4 min read
    State Space Search in AI
    State Space Search is used to solve problems by finding different possible states and their transitions. In simple terms it’s like finding the best route to goal by trying different paths. In this article, we will understand it and implement Breadth-First Search (BFS) to solve the 8-puzzle problem.T
    9 min read
    Handling State and State Management | System Design
    State management is a critical aspect of system design that involves managing the state or condition of a system at any given point in time. In software development, state refers to the current values of variables, data, and configurations that determine the behavior of an application or system. Eff
    12 min read
    State Transition Matrix and Diagram
    State Transition Matrices and Diagrams are powerful tools used in the various disciplines including the computer science, engineering and control systems to model the behavior of the systems that transition between the different states. Understanding these concepts is crucial for the students and pr
    9 min read
    Understanding React State and Data Flow
    React, a very popular JavaScript library used for building user interfaces has the concept of components and they can manage the states efficiently. ReactJs is based on the concept of uni-directional data transfer. In this article, we will understand React State and Data Flow across the application.
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences