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

SISO with Synchronous Clear

MediumLogic CircuitBuild

Data pipelines and communication interfaces require a mechanism to flush stale bits before loading a new data frame. A 4-bit serial-in, serial-out shift register with synchronous clear provides this capability by resetting all internal stages precisely on the clock edge.

The circuit shifts data from din to dout across four clock cycles. When clr is asserted high, the next rising edge of the clock must force all internal flip-flop states to 0 simultaneously. The output dout represents the state of the final flip-flop in the chain.

To maintain synchronous operation, the clear signal must be integrated into the data path of each stage. For any given stage, the effective data input (D_next) depends on the previous stage's output (Q_prev) and the clr signal:

| clr | Q_prev | D_next | |-------|----------|----------| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 0 | | 1 | 1 | 0 |

*(Note: For the first stage, Q_prev is din.)*

Constraints

  • Use exactly four D flip-flops.
  • Implement the synchronous clear using combinational logic on the D inputs.
  • Do not use asynchronous reset pins on the flip-flops.

Topics

ResetSynchronous LogicShift Registers

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

  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Edge Detector Delayed by Extra CycleMedium
  • Signed vs Unsigned Comparison FailureHard
  • Incomplete Case StatementEasy
  • Counter Wrapping at Wrong ValueEasy

Browse all problems · Learning tracks