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

JK Flip-Flop: J and K Input Swapped Debug

HardLogic CircuitDebug

A JK flip-flop stores a single bit of state and allows for set, reset, and toggle operations synchronized to a clock signal.

Expected behavior:

| J | K | Q_next | |-----|-----|----------| | 0 | 0 | Q | | 0 | 1 | 0 | | 1 | 0 | 1 | | 1 | 1 | ~Q |

Simulation shows Q = 0 after a rising clock edge when inputs are J=1 and K=0. Furthermore, applying J=0 and K=1 produces Q = 1. The toggle operation J=1 and K=1 correctly inverts the current state. The set and reset behaviors are failing. Inspect the circuit and correct the fault.

Constraints

  • Do not add new gates or components to the circuit.
  • Only modify the existing wire connections to fix the fault.

Topics

debugsequential-logicjk-flip-floppin-swap

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