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

Bidirectional SR: Timing for Direction Change at Terminal Stage

HardLogic CircuitTiming Diagram

A 4-bit bidirectional shift register shifts its contents right (Q3 towards Q0) when DIR is 1 and left (Q0 towards Q3) when DIR is 0 at every LOW-to-HIGH transition of CLK. The waveform shows four input signals: CLK (clock, period 2), DIR (direction control), SR (right-shift serial input feeding Q3), and SL (left-shift serial input feeding Q0). The register state is represented by outputs Q3, Q2, Q1, and Q0, all initially 0. Trace all four output signals across all 16 time steps.

Constraints

  • Outputs only change state on the LOW-to-HIGH transition of CLK.
  • The DIR signal evaluated precisely at the rising clock edge determines the shift direction for that cycle.
  • A bit shifted out of the terminal stage in the direction of movement is lost.

Topics

shift-registertimingedge-triggeredsequential-logic

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