Skip to content

VLSIFacts

Let's Program the Transistors

  • Home
  • DHD
    • Digital Electronics
    • Fault Tolerant System Design
    • TLM
    • Verification
    • Verilog
    • VHDL
    • Xilinx
  • Embedded System
    • 8085 uP
    • 8086 uP
    • 8051 uC
  • VLSI Technology
    • Analog Electronics
    • Memory Devices
    • VLSI Circuits
  • Interview
    • Interview Experience
    • Training Experience
    • Question Bank
  • Notifications
  • QUIZ
  • Community
  • Job Board
  • Contact Us
  • Toggle search form

Circuit Design of a 4-bit Binary Counter Using D Flip-flops

Posted on November 5, 2015June 16, 2025 By vlsifacts 22 Comments on Circuit Design of a 4-bit Binary Counter Using D Flip-flops

Problem Statement:

Design a circuit for an edge triggered 4-bit binary up counter (0000 to 1111). When it reaches “1111”, it should revert back to “0000” after the next edge. Use positive edge triggered D flip-flop (shown in the below figure) to design the circuit.

PinInput / OutputDescription
DInputData Input
CLKInputClock Input
Q<3:0>Output (4-bits)Count Output
D FF VLSIF

Solution:

The flip flop to be used here to design the binary counter is D-FF.

Let’s draw the excitation table for the D-FF

Present State (Q)Input (D)Next State (Q+)
000
011
100
111

The characteristic equation for the D-FF is: Q+ = D

We need to design a 4 bit up counter. So, we need 4 D-FFs to achieve the same.

Let’s draw the state diagram of the 4-bit up counter

4-bit counter state diagram VLSIF

Let’s construct the truth table for the 4-bit up counter using D-FF

Present State

(Q3 Q2 Q1 Q0)

Next State

(Q3+ Q2+ Q1+ Q0+)

D3D2D1D0
000000010001
000100100010
001000110011
001101000100
010001010101
010101100110
011001110111
011110001000
100010011001
100110101010
101010111011
101111001100
110011011101
110111101110
111011111111
111100000000

Now constructing the K-Maps and finding out the logic expressions for D3, D2, D1, D0

D3D2
D3
D2
D3 = Q3Q2′ + Q3Q0′ + Q3Q1′ + Q3’Q2Q1Q0D2 = Q2Q0′ + Q2Q1′ + Q2’Q1Q0
D1D0
 
D1
 
D0
 D1 = Q1’Q0 + Q1Q0′  = Q1 ⊕ Q0 D0 = Q0′

So, we found the value of D3, D2, D1, D0 in terms of Q3, Q2, Q1, Q0.

Let’s draw the designed circuit of the 4-bit up counter using D-FF

4 bit counter Final VLSIF

The counter output would be collected from Q3, Q2, Q1 and Q0.

Spread the Word

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print

Like this:

Like Loading...

Related posts:

  1. Difference between Combinational and Sequential logic circuits.
  2. State Machine Diagram for Pattern Recognition / Sequence Detector
  3. Circuit Design of a Sequence Detector
  4. Digital Design Methodologies
Digital Electronics Tags:4-bit Binary Counter, Binary Counter, Counter, Counter using D-FF, D-FF, Mod-16 Counter

Post navigation

Previous Post: Difference between Latch and Flip-Flop
Next Post: Digilent Design Contest 12th Edition

Comments (22) on “Circuit Design of a 4-bit Binary Counter Using D Flip-flops”

  1. deepak kumar says:
    November 5, 2015 at 2:57 pm

    hello , i m really very impressed to you .
    can u please post or send me the synthesis of FSM.

    Reply
    1. Sidhartha says:
      November 5, 2015 at 3:35 pm

      Hey Deepak,

      Thanks for the appreciation. We would definitely publish a post on the synthesis of the FSM very soon.

      Reply
      1. aruna says:
        September 13, 2017 at 3:23 am

        really very glad to see ur smart work.It helped me a lot baiyaa..tank u soo much

        Reply
        1. Sidhartha says:
          September 19, 2017 at 12:34 pm

          Hey Aruna,
          Thanks a lot. Keep visiting VLSIFacts. Lot more to come. Subscribe to the blog and like our FB page.

          Reply
  2. Ritesh raj says:
    October 17, 2017 at 8:05 am

    Nice explanation. Keep it up

    Reply
    1. Sidhartha says:
      October 22, 2017 at 7:28 pm

      Hey Ritesh,

      Thanks for your appreciation. Stay tuned to VLSIFacts for more such posts.

      Reply
  3. Daud says:
    November 2, 2017 at 11:21 am

    Nice sir

    Reply
    1. Sidhartha says:
      November 5, 2017 at 6:11 pm

      Thanks a lot

      Reply
  4. sunitha bai p says:
    October 13, 2018 at 4:11 am

    hi Mr Siddharth
    ho design a 4 bit ripple counter

    Reply
    1. Sidhartha says:
      October 13, 2018 at 4:47 am

      Hi Sunitha,

      Sure, I would upload the same this week.

      Reply
  5. Jerry Seinfeld says:
    November 14, 2018 at 1:10 pm

    You get a much nicer equivalent circuit if you notice that
    D2 = Q2 ⊕ (Q1Q0)
    D3 = Q3 ⊕ (Q2Q1Q0)

    It should not be the case that the number of gates you need to add with each new flip flop increases.

    Reply
  6. nathan says:
    December 13, 2018 at 1:25 am

    thank you sir

    Reply
    1. Sidhartha says:
      December 13, 2018 at 12:09 am

      Welcome Nathan

      Reply
  7. Mehedi md says:
    December 18, 2018 at 12:56 pm

    1: Use several jk flip-flops to realize a counter. the counting sequence is from 0000 through 1011, and then go back to 0000. please draw the circuit.
    2: How can you solve the question 1 if you only have D flip flops? only explain it.

    Reply
    1. Sidhartha says:
      February 23, 2019 at 8:10 am

      Hi Mehdi,

      Sorry for such a late reply. I would create separate posts for these designs and would upload.

      Reply
  8. Sjef says:
    January 16, 2019 at 5:31 am

    Hey

    First of all i would like to thank you for making this.
    I have a question tho.
    Is this acording the MOORE method and if yes would it mean that for a 3 bit counter i would jus have to remove the q3/d3.
    And would it be possible to add a function to make it count like 1 3 5 1 3 5…..

    Reply
    1. Sidhartha says:
      February 23, 2019 at 8:09 am

      Hi,

      First of all I am very sorry for such a delayed comment. And thank you very much for your appreciation.
      Now to your questions:
      (i) Yes it is according to MOORE method.
      (ii) For a 3 bit counter, of course you would need 3 Flip-flops only. But it’s not like that you will only remove the 3rd FF. We have to think about the input logic as well. Yes you can remove D3 and Q3 from the truth table then go through the whole process we have done for the 4 bit counter.
      (iii) to make it count like 1 3 5 1 3 5….. adding a function to the existing design would also work but that is a tricky and one. Again why would you go for a 4 bit counter if your largest count is 5. So, it is better to start the process of design from the beginning and design the circuit.

      Let me know if you have any further doubt.

      Reply
  9. Abdulrafay says:
    May 29, 2019 at 11:41 am

    I want to convert Q0 Q1 Q2 Q3 decimal numbers and want to display on 7 segment display. Please guide me.

    Reply
  10. amtal says:
    January 28, 2020 at 7:43 pm

    You are required to design a 4-bit even up-counter using D flip flop by converting combinational circuit to sequential circuit. The counter will only consider even inputs and the sequence of inputs will be 0-2-4-6-8-10-0.
    You are required to perform following tasks:
    1. Draw the State diagram.
    2. Generate State & Transition Table.
    3. Generate simplified Boolean Expression.
    4. Design the final Circuit diagram.
    PLEASE SOLVE THIS

    Reply
  11. ADARSH TIWARI says:
    April 30, 2020 at 10:05 am

    THANK YOU SO MUCH. IT HELPED ME ALOT

    Reply
    1. Sidhartha says:
      May 5, 2020 at 3:32 am

      Most welcome Adarsh

      Reply
  12. Ibrar babar says:
    June 10, 2020 at 5:09 am

    First of all i am very great full to you sir.
    My question is that how can i design this circuit on PC soft form?
    This is my Semester end project of DLD.
    I want some information like you can please help me in guiding what software i use for designing this circuit in soft form.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top Posts & Pages

  • ASCII Code
  • Circuit Design of a 4-bit Binary Counter Using D Flip-flops
  • NAND and NOR gate using CMOS Technology
  • AND and OR gate using CMOS Technology
  • Difference between $display, $monitor, $write and $strobe in Verilog


 

Copyright © 2025 VLSIFacts.

Powered by PressBook WordPress theme

%d