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

DFF with Synchronous Set and Reset: Priority-Encoded D Path

MediumLogic CircuitBuild

Register-file designs and arithmetic unit controllers frequently require state elements that can be forced high or low on a clock edge. When multiple control signals can fire simultaneously, the datapath requires explicit priority encoding to ensure deterministic behavior.

Construct a D flip-flop with a synchronous reset signal R and a synchronous set signal S. The reset condition has strict priority over the set condition. All state updates occur on the rising edge of the clock.

| R | S | D | Next Q | |-----|-----|-----|----------| | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 1 | | 0 | 1 | 0 | 1 | | 0 | 1 | 1 | 1 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 0 | | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 0 |

Constraints

  • Implement the priority logic strictly in the combinational path feeding the flip-flop's D input.
  • Use exactly one standard D flip-flop.
  • Do not use asynchronous set or clear pins on the flip-flop.

Topics

MultiplexersFlip-FlopsSynchronous LogicPriority

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