CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

4-Bit Synchronous Counter Using JK Flip-Flops

HardLogic CircuitBuild

Legacy discrete logic families like the 74LS191 rely heavily on JK flip-flops to implement counting and state machine functions. Mastering JK excitation logic is essential for analyzing older schematics and understanding the foundation of synchronous counter design.

Construct a 4-bit synchronous up-counter using JK flip-flops. On every rising edge of clk, the 4-bit output formed by Q3, Q2, Q1, and Q0 must increment by 1. When the counter reaches 15 (1111), it must wrap around to 0 (0000). An active-high asynchronous rst signal must clear all outputs to 0 immediately when asserted.

Use the standard JK flip-flop excitation table to derive the logic for each stage:

| Q(t) | Q(t+1) | J | K | |--------|----------|-----|-----| | 0 | 0 | 0 | X | | 0 | 1 | 1 | X | | 1 | 0 | X | 1 | | 1 | 1 | X | 0 |

Constraints

  • Use exactly four JK flip-flops.
  • Connect the rst input to the asynchronous clear ports of all flip-flops.
  • Derive and implement the combinational logic for the J and K inputs using only AND gates.
  • Do not use D flip-flops, T flip-flops, or pre-built counter modules.

Topics

Sequential LogicCountersJK Flip-Flop

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks