ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCC-110Counter Design
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    CC-110

    Digital Logic Design

    Progress0 / 63 done
    Topics63
    1Introduction to Digital Systems2Number Systems3Introduction to Boolean Algebra4Basic theorems and properties of Boolean Algebra5Boolean Functions6Logic Gates7NAND and NOR Implementation8Representation of Function in Sum of Minterms or Product of Maxterms9Simplification of Boolean function using Karnaugh Map10Don't care Conditions11The Tabulation Method12Introduction to Combinational Logic13Design of Adders14Design of Subtractors15Code Convertors16Analysis Procedure of Combinational Circuits17Binary Parallel Adders18Decimal Adders19Magnitude Comparator20Decoders and its applications21Multiplexers22Demultiplexers23Encoders24ROM25Programmable Logic Array (PLA)26Introduction to Sequential Circuits27Basic Flip Flop28Clocked RS Flip Flop29Clocked D Flip Flop30Clocked JK Flip Flop31Clocked T Flip Flop32Analysis of Clocked Sequential Circuits33State Reduction and Assignment34Flip Flop Excitation tables35Design Procedure36Design of Counters37Design with State Equations38Introduction to Registers39Shift Registers40Ripple Counters41Synchronous Counters42Timing Sequences43Memory Unit44Random Access Memory45Introduction to Programmable Logic Devices (CPLD, FPGA)46Lab Assignments using tools such as Verilog HDL/VHDL, MultiSim47Familiarization with Digital Electronic Trainer48Logic gates operations49Half Adder Operation50Full Adder Operation51Half Subtractor Operation52Full Subtractor Operation537-Segment Display Operation54Decoder Operation55BCD To 7-Segment Display56Multiplexer Operation57Using Multiplexer and Demultiplexer/Decoder58Multiplexing 7-Segment Displays59Comparator Operations60D Latch and Flip-Flop Operation61Latching BCD Data for Displaying On 7-Segment Display62JK Flip-Flop Operation63Random Access Memories
    7 min read
    Topic 36 of 63
    Topic Study Note Illustration
    36

    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...

    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

    Flip-flop electronics
    Visual ReferenceFlip-Flop Electronics
    Wikipedia

    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)

    Shift register
    Visual ReferenceShift Register
    Wikipedia

    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 view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    7mremaining
    1.1kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Digital Logic Design