ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Digital Logic Design
    CC-110
    Progress0 / 63 topics
    Topics
    1. Introduction to Digital Systems2. Number Systems3. Introduction to Boolean Algebra4. Basic theorems and properties of Boolean Algebra5. Boolean Functions6. Logic Gates7. NAND and NOR Implementation8. Representation of Function in Sum of Minterms or Product of Maxterms9. Simplification of Boolean function using Karnaugh Map10. Don't care Conditions11. The Tabulation Method12. Introduction to Combinational Logic13. Design of Adders14. Design of Subtractors15. Code Convertors16. Analysis Procedure of Combinational Circuits17. Binary Parallel Adders18. Decimal Adders19. Magnitude Comparator20. Decoders and its applications21. Multiplexers22. Demultiplexers23. Encoders24. ROM25. Programmable Logic Array (PLA)26. Introduction to Sequential Circuits27. Basic Flip Flop28. Clocked RS Flip Flop29. Clocked D Flip Flop30. Clocked JK Flip Flop31. Clocked T Flip Flop32. Analysis of Clocked Sequential Circuits33. State Reduction and Assignment34. Flip Flop Excitation tables35. Design Procedure36. Design of Counters37. Design with State Equations38. Introduction to Registers39. Shift Registers40. Ripple Counters41. Synchronous Counters42. Timing Sequences43. Memory Unit44. Random Access Memory45. Introduction to Programmable Logic Devices (CPLD, FPGA)46. Lab Assignments using tools such as Verilog HDL/VHDL, MultiSim47. Familiarization with Digital Electronic Trainer48. Logic gates operations49. Half Adder Operation50. Full Adder Operation51. Half Subtractor Operation52. Full Subtractor Operation53. 7-Segment Display Operation54. Decoder Operation55. BCD To 7-Segment Display56. Multiplexer Operation57. Using Multiplexer and Demultiplexer/Decoder58. Multiplexing 7-Segment Displays59. Comparator Operations60. D Latch and Flip-Flop Operation61. Latching BCD Data for Displaying On 7-Segment Display62. JK Flip-Flop Operation63. Random Access Memories
    CC-110›Design with State Equations
    Digital Logic DesignTopic 37 of 63

    Design with State Equations

    7 minread
    1,219words
    Intermediatelevel

    Designing counters using state equations involves breaking down the design process into defining the system's states and determining the state transitions using Boolean algebra to describe the flip-flop inputs. A state equation represents the next state of a flip-flop in terms of its current state and the system's inputs.

    To design a counter with state equations, we will follow a step-by-step procedure:

    Steps for Design with State Equations

    1. Define the Number of States

      • For an nnn-bit counter, there will be 2n2^n2n states. For example, a 3-bit counter has 8 states (from 000 to 111).
      • Determine the counting direction (up or down) and whether it is a synchronous or asynchronous counter.
    2. State Diagram

      • Draw the state diagram for the counter. In the state diagram, each state represents a binary value, and the transitions between states are driven by the clock and possibly other control inputs.
      • In an up counter, the states will increment by one on each clock pulse, while in a down counter, the states will decrement by one.
    3. State Table

      • Construct the state table that defines the current state and the next state for each possible transition.
      • For each state, you will also list the inputs needed for the flip-flops (e.g., TTT, DDD, or JKJKJK) that will generate the correct state transitions.
    4. Define the Flip-Flops

      • Decide on the type of flip-flops to use in the design (typically, T flip-flops or D flip-flops). This decision impacts how the state equations are formed.
      • T Flip-Flops: Used to toggle the state with each clock pulse. The input is "1" to toggle the flip-flop, and "0" to hold the current state.
      • D Flip-Flops: Directly pass the next state value to the output. The D input is set to the next state value for each clock pulse.
    5. State Equations

      • The state equations define the logic needed to generate the next state of each flip-flop. These equations are derived from the state table and describe how the flip-flop inputs should behave to transition from one state to another.

    Example: Design of a 2-bit Up Counter Using T Flip-Flops

    Let's design a simple 2-bit binary up counter using T flip-flops. This counter will count from 00 to 11 and then wrap back around to 00. We will derive the state equations step by step.

    1. Define the Number of States

    For a 2-bit counter, we need 2 flip-flops. This will give us 4 states: 00, 01, 10, and 11.

    2. State Diagram

    The state diagram for an up counter looks like this:

    • 00 → 01 → 10 → 11 → 00 (and so on)

    3. State Table

    The state table shows the transitions for the 2-bit up counter:

    Current State (Q1 Q0) Next State (Q1 Q0) T1 T0
    00 01 1 1
    01 10 1 0
    10 11 1 1
    11 00 0 1
    • Q1 and Q0 represent the outputs of the two flip-flops.
    • T1 and T0 represent the toggle inputs for the T flip-flops.

    4. Deriving the State Equations

    To derive the state equations, we will use the truth table to understand how each flip-flop behaves. For T flip-flops, the input TTT determines whether the flip-flop toggles its state (if T=1T = 1T=1) or holds its state (if T=0T = 0T=0).

    • From the state table, we can see that T1 (for flip-flop Q1) should be:

      • 1 when the current state is 00, 01, or 10 (because in these states, Q1 toggles to the next state).
      • 0 when the current state is 11 (because in this state, Q1 should stay at 0).

      Therefore, we can write the Boolean expression for T1 as:

      T1=Q0T1 = Q0T1=Q0

      This is because Q1 toggles when Q0 is 1 and holds its state when Q0 is 0.

    • Similarly, T0 (for flip-flop Q0) toggles every time the counter advances:

      • T0 should be 1 when the current state is 00, 01, or 10 (because in these states, Q0 toggles).
      • T0 should be 0 when the current state is 11.

      Therefore, the Boolean expression for T0 is:

      T0=1T0 = 1T0=1

      This indicates that T0 is always 1, meaning flip-flop Q0 will toggle on every clock pulse.

    5. Simplified Logic

    • T1 = Q0
    • T0 = 1

    These are the state equations that define the logic needed to control the T flip-flops for the 2-bit up counter.

    6. Circuit Design

    Now that we have the state equations, we can design the circuit:

    • T1 is connected to Q0, so flip-flop 1 (FF1) toggles when flip-flop 0 (FF0) is 1.
    • T0 is always 1, so flip-flop 0 (FF0) will toggle on every clock pulse.

    The resulting circuit consists of:

    • Two T flip-flops (FF0 and FF1).
    • The T1 input of FF1 is connected to Q0.
    • The T0 input of FF0 is connected to 1 (constant high signal).

    Example: Design of a 3-bit Up Counter Using State Equations

    Let’s extend the previous example to a 3-bit up counter.

    1. Define the Number of States

    For a 3-bit counter, we need 3 flip-flops, giving us 8 states: 000, 001, 010, 011, 100, 101, 110, 111.

    2. State Diagram

    The state diagram for the 3-bit up counter is:

    • 000 → 001 → 010 → 011 → 100 → 101 → 110 → 111 → 000

    3. State Table

    For a 3-bit up counter, the state table would look like this:

    Current State (Q2 Q1 Q0) Next State (Q2 Q1 Q0) T2 T1 T0
    000 001 1 0 1
    001 010 1 1 0
    010 011 1 0 1
    011 100 1 1 0
    100 101 1 0 1
    101 110 1 1 0
    110 111 1 0 1
    111 000 0 1 0

    4. Deriving the State Equations

    We can derive the state equations for T2, T1, and T0 from the state table:

    • T2 (for flip-flop Q2) should toggle when Q1 and Q0 are 1. This results in the equation:

      T2=Q1⋅Q0T2 = Q1 \cdot Q0T2=Q1⋅Q0
    • T1 (for flip-flop Q1) should toggle when Q0 is 1, regardless of Q2. This gives the equation:

      T1=Q0T1 = Q0T1=Q0
    • T0 (for flip-flop Q0) should toggle on every clock pulse, so:

      T0=1T0 = 1T0=1

    5. Final State Equations

    • T2 = Q1 \cdot Q0
    • T1 = Q0
    • T0 = 1

    These are the state equations that define the behavior of the 3-bit up counter. The circuit can now be implemented by connecting the T flip-flops with the respective inputs based on these equations.

    Conclusion

    The design of counters using state equations involves:

    1. Defining the number of states and the counting sequence.
    2. Constructing a state diagram and state table.
    3. Deriving state equations for each flip-flop using the state transitions.
    4. Implementing the design with flip-flops and logic gates.

    State equations provide a compact and systematic way to design counters, making it easier to control the flip-flops based on the desired counting sequence.

    Previous topic 36
    Design of Counters
    Next topic 38
    Introduction to Registers

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time7 min
      Word count1,219
      Code examples0
      DifficultyIntermediate