Binary counter from flip-flops
Build it step by step
0 of 7 doneBuild the debounced clock
Button, 10 kΩ pull-up, 100 nF, and the 74HC14 as the table shows.
Wire the first flip-flop
D to /Q and the clock to the 74HC14 output. LED on Q.
Chain the stages
The next clock is the previous /Q. Wire all four stages.
Tie PRE and CLR
PRE high, CLR to a reset button with a pull-up.
Count
Press the clock button 16 times and watch the binary count 0000 to 1111.
Reset
Press the clear button and the LEDs go dark.
Think about it
What happens to the count if you clock a stage from Q instead of /Q?
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
- Integrated CircuitsBuy
- Integrated CircuitsBuy
- SwitchesBuy
- PassivesBuyResistor 10 kΩ × 2
- PassivesBuy
- SemiconductorsBuyLED 5 mm red × 4
- PassivesBuyResistor 330 Ω × 4
- PrototypingBuy
- PrototypingBuy
- PowerBuy
- PowerBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| Clock button | Node to GND, 10 kΩ from +5 V to the node, 100 nF from node to GND | RC debounce |
| Node | 74HC14 pin 1; pin 2 output is the clock | Clean rising edge on each press |
| 74HC74 chip 1, FF1: pin 2 (D) | Pin 6 (/Q) | Toggle |
| Chip 1 pin 3 (CLK) | 74HC14 pin 2 | Clock 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 8 | Same wiring | Bit 2 on pin 5 |
| Chip 2 FF4: D (pin 12) to /Q (pin 8), CLK (pin 11) from chip 2 pin 6 | Same wiring | Bit 3 on pin 9 |
| All PRE pins (4 and 10) | +5 V | Never preset |
| All CLR pins (1 and 13) | Reset node: 10 kΩ to +5 V and a button to GND | Press to clear the count |
| Unused 74HC14 inputs | GND | Tie 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.
| Check | Expected |
|---|---|
| Each press | The count rises by exactly one |
| After 15 | Next press returns to 0 |
| Reset button | All LEDs off |
| Clocking from Q instead of /Q | The 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 →
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.
