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

JK Flip-Flop: Construction Directly from SR NAND Latch

HardLogic CircuitBuild

Resolving undefined states in memory elements is critical for stable state machines and counters. The JK configuration extends a basic latch by utilizing output feedback to eliminate the forbidden state and introduce a deterministic toggle function.

Construct a level-sensitive (pulse-triggered) JK flip-flop. When CLK is high, the outputs Q and Q_bar must update according to the inputs J and K. When CLK is low, the circuit must hold its current state regardless of changes to J or K.

| J | K | CLK | Q (next) | Q_bar (next) | |-----|-----|-------|------------|----------------| | 0 | 0 | 1 | Q | Q_bar | | 0 | 1 | 1 | 0 | 1 | | 1 | 0 | 1 | 1 | 0 | | 1 | 1 | 1 | Q_bar | Q | | X | X | 0 | Q | Q_bar |

Constraints

  • Use exactly one SR NAND Latch component.
  • Use exactly two 3-input AND gates for the input steering logic.
  • Route the Q and Q_bar outputs back to the input steering gates to prevent simultaneous SET and RESET commands.
  • Do not use any edge-triggered flip-flop components.

Topics

LatchesSequential LogicFlip-Flops

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