Projects / Binary counter from flip-flops

Binary counter from flip-flops

Beginner1.5 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. 74HC14

    Build the debounced clock

    Button, 10 kΩ pull-up, 100 nF, and the 74HC14 as the table shows.

  2. 74HC7474HC1415.1 mA

    Wire the first flip-flop

    D to /Q and the clock to the 74HC14 output. LED on Q.

  3. Chain the stages

    The next clock is the previous /Q. Wire all four stages.

  4. Tie PRE and CLR

    PRE high, CLR to a reset button with a pull-up.

  5. Count

    Press the clock button 16 times and watch the binary count 0000 to 1111.

  6. 15.1 mA

    Reset

    Press the clear button and the LEDs go dark.

  7. Think about it

    What happens to the count if you clock a stage from Q instead of /Q?

In short

How do you build a binary counter from flip-flops?

Chain D flip-flops into a 4-bit ripple counter clocked by a debounced button, with LEDs showing the count. You need 74HC74 dual D flip-flop × 2, 74HC14 hex Schmitt-trigger inverter, Tactile push button 6 mm × 2, Resistor 10 kΩ × 2, Ceramic Capacitor 100 nF, LED 5 mm red × 4, Resistor 330 Ω × 4, Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm), Breadboard power supply module (MB102) and 12 V 2 A DC adapter. It takes 7 steps and about 90 minutes.

Level
Beginner
Time
About 90 min
Parts
11

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Clock buttonNode to GND, 10 kΩ from +5 V to the node, 100 nF from node to GNDRC debounce
Node74HC14 pin 1; pin 2 output is the clockClean rising edge on each press
74HC74 chip 1, FF1: pin 2 (D)Pin 6 (/Q)Toggle
Chip 1 pin 3 (CLK)74HC14 pin 2Clock from the button
Chip 1 pin 5 (Q)LED 0 through 330 ΩBit 0
Chip 1 FF2: pin 12 (D)Pin 8 (/Q)Toggle
Chip 1 pin 11 (CLK)Chip 1 pin 6 (/Q of FF1)Ripple from the previous stage
Chip 1 pin 9 (Q)LED 1 through 330 ΩBit 1
Chip 2 FF3: D (pin 2) to /Q (pin 6), CLK (pin 3) from chip 1 pin 8Same wiringBit 2 on pin 5
Chip 2 FF4: D (pin 12) to /Q (pin 8), CLK (pin 11) from chip 2 pin 6Same wiringBit 3 on pin 9
All PRE pins (4 and 10)+5 VNever preset
All CLR pins (1 and 13)Reset node: 10 kΩ to +5 V and a button to GNDPress to clear the count
Unused 74HC14 inputsGNDTie off

No code needed

No code. Power: a breadboard power supply module (MB102) from the 12 V adapter, with its jumper set to 5 V. Connect pin 14 and pin 7 on each 74HC74 and 74HC14 to +5 V and GND. Each flip-flop is a divide-by-two because D is wired to its own /Q, so every rising clock edge flips its output. Clocking the next stage from /Q gives an up count.

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Each pressThe count rises by exactly one
After 15Next press returns to 0
Reset buttonAll LEDs off
Clocking from Q instead of /QThe count goes down

If it does not work

Count jumps by more than one

The button is bouncing. Check the 100 nF, 10 kΩ and Schmitt trigger.

Random start

Normal at power up. Press reset.

One bit never changes

The D to /Q wire or the clock link is missing at that stage.

All LEDs stay on

CLR is stuck low. Check the pull-up on the reset line.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the binary counter from flip-flops?

74HC74 dual D flip-flop × 2, 74HC14 hex Schmitt-trigger inverter, Tactile push button 6 mm × 2, Resistor 10 kΩ × 2, Ceramic Capacitor 100 nF, LED 5 mm red × 4, Resistor 330 Ω × 4, Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm), Breadboard power supply module (MB102) and 12 V 2 A DC adapter.

How long does the binary counter from flip-flops take to build?

About 90 minutes for a beginner maker, in 7 steps.

How do I know the binary counter from flip-flops works?

Each press: The count rises by exactly one. After 15: Next press returns to 0. Reset button: All LEDs off.

Count jumps by more than one: what should I check?

The button is bouncing. Check the 100 nF, 10 kΩ and Schmitt trigger.

Random start: what should I check?

Normal at power up. Press reset.

One bit never changes: what should I check?

The D to /Q wire or the clock link is missing at that stage.

All LEDs stay on: what should I check?

CLR is stuck low. Check the pull-up on the reset line.