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

Bidirectional SR: Ping-Pong Data Pattern

HardLogic CircuitTiming Diagram

A 4-bit bidirectional shift register shifts its bits right (Q3 to Q0) when DIR is 1 and left (Q0 to Q3) when DIR is 0 on every LOW-to-HIGH transition of CLK.

Three input signals are shown: CLK (clock, period 2), DIR (direction control), and SER_IN (serial input for both shift directions). The register outputs are Q3, Q2, Q1, and Q0, initialized to 1, 0, 0, and 0 respectively.

Trace outputs Q3, Q2, Q1, and Q0 across all 16 time steps.

Constraints

  • Outputs update only on the LOW-to-HIGH transition of CLK.
  • The serial input SER_IN feeds Q3 during a right shift and Q0 during a left shift.
  • Changes to the DIR signal between clock edges do not affect the output until the next rising clock edge.

Topics

Shift RegistersBidirectionalState Tracking

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