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 of Counters
    Digital Logic DesignTopic 36 of 63

    Design of Counters

    6 minread
    1,101words
    Intermediatelevel

    Design of Counters

    Counters are sequential circuits that store and change their state in a predefined manner. They are often used for counting events or generating specific sequences of outputs based on clock pulses. In Digital Logic Design, counters can be classified into two main types:

    • Asynchronous (Ripple) Counters: The flip-flops in the counter are triggered by different clock signals.
    • Synchronous Counters: All flip-flops in the counter are triggered by the same clock signal.

    Counters can also be classified based on the counting sequence they follow:

    • Up Counters: Count upwards (e.g., 000, 001, 010, 011, etc.).
    • Down Counters: Count downwards (e.g., 111, 110, 101, 100, etc.).
    • Up/Down Counters: Can count either up or down depending on a control input.

    The basic design procedure for counters involves defining the type, state transitions, and selecting appropriate flip-flops and logic to implement the counting sequence.

    Steps to Design a Counter

    1. Define the Counting Sequence

    The first step in designing a counter is to define the counting sequence and number of bits required for the counter.

    • Up Counter: If you need a 3-bit counter that counts from 0 to 7 (i.e., 000, 001, 010, … 111), the sequence is 000, 001, 010, 011, 100, 101, 110, 111.
    • Down Counter: A 3-bit down counter would count from 7 to 0 (i.e., 111, 110, 101, … 000).
    • Up/Down Counter: Depending on the control input, it can count either up or down.

    2. Determine the Number of Flip-Flops

    The number of flip-flops required for a counter depends on how many states it needs to represent. The formula is:

    Number of Flip-Flops=⌈log⁡2(N)⌉\text{Number of Flip-Flops} = \lceil \log_2(N) \rceilNumber of Flip-Flops=⌈log2​(N)⌉

    Where NNN is the number of states the counter needs to represent. For example:

    • A 3-bit counter requires ⌈log⁡2(8)⌉=3\lceil \log_2(8) \rceil = 3⌈log2​(8)⌉=3 flip-flops.

    3. Select the Type of Flip-Flop

    The most commonly used flip-flops for counters are:

    • T Flip-Flop (Toggle): A T flip-flop toggles its state when its T input is high. It is often used in simple up or down counters because it changes state with each clock pulse.
    • D Flip-Flop: The D flip-flop stores a data bit at the clock edge. It is used when more controlled state transitions are needed.
    • JK Flip-Flop: The JK flip-flop can be configured to perform various functions (Set, Reset, Toggle, Hold) based on its inputs.

    4. Draw the State Diagram

    The state diagram visually represents the transitions between the different states of the counter. Each state is represented by a circle, and arrows indicate transitions based on clock pulses.

    • For a 3-bit counter, the state diagram would have 8 states (from 000 to 111) for an up-counter or the reverse for a down-counter.

    5. Create a State Table

    The state table lists the current state, next state, and the required inputs for the flip-flops to make the transition between states. For example, in an up-counter, the state table for a 3-bit counter might look like:

    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 1 1 0

    6. Derive the Flip-Flop Excitation Table

    Once you have the state table, use flip-flop excitation tables to derive the required inputs (T, D, or JK) to make the state transitions. The excitation table for each flip-flop will tell you how to set the flip-flop inputs to achieve the next state.

    • For a T Flip-Flop, the input TTT needs to be 1 to toggle the output.
    • For a D Flip-Flop, the input DDD must equal the next state for that bit.

    7. Simplify the Logic (if necessary)

    Once you have the inputs for each flip-flop, simplify the logic (if necessary) to reduce the number of gates required. You can use Boolean algebra or Karnaugh Maps (K-maps) to minimize the Boolean expressions for the flip-flop inputs.

    8. Design the Circuit

    Finally, implement the counter based on the chosen flip-flops and the derived inputs. Draw the circuit diagram with the flip-flops connected, ensuring that:

    • The clock is connected to each flip-flop.
    • The flip-flops’ outputs are connected as necessary to form the counting sequence.
    • The flip-flop inputs are connected based on the simplified Boolean expressions for the transitions.

    Types of Counters

    1. Up Counter (Binary Counter)

    A binary up counter counts from 0 to 2n−12^n - 12n−1, where nnn is the number of flip-flops. For example, a 3-bit counter counts from 000 to 111 in binary.

    • State Table Example (3-bit Up Counter):
    Current State Next State 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 1 1 0

    2. Down Counter (Binary Counter)

    A binary down counter counts from 2n−12^n - 12n−1 to 0.

    • State Table Example (3-bit Down Counter):
    Current State Next State T2 T1 T0
    111 110 1 0 1
    110 101 1 1 0
    101 100 1 0 1
    100 011 1 1 0
    011 010 1 0 1
    010 001 1 1 0
    001 000 1 0 1
    000 111 1 1 0

    3. Up/Down Counter

    An Up/Down counter can count both upwards and downwards based on a control input (Up/Down).

    • State Table Example (Up/Down Counter):
    Current State Next State (Up) Next State (Down) T2 T1 T0
    000 001 111 1 0 1
    001 010 000 1 1 0
    010 011 001 1 0 1
    011 100 010 1 1 0
    100 101 011 1 0 1
    101 110 100 1 1 0
    110 111 101 1 0 1
    111 000 110 1 1 0

    Conclusion

    The design of counters involves defining the counting sequence, selecting appropriate flip-flops, deriving state tables and excitation tables, and simplifying the logic. Counters can be up, down, or up/down and can be implemented using different types of flip-flops like T, D, and JK. Proper design ensures efficient counting functionality in various digital systems.

    Previous topic 35
    Design Procedure
    Next topic 37
    Design with State Equations

    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 time6 min
      Word count1,101
      Code examples0
      DifficultyIntermediate