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

Bidirectional SR: Boundary Condition at Stage 0 and Stage 3

HardLogic CircuitTiming Diagram

A 4-bit bidirectional shift register shifts its contents right or left on every LOW-to-HIGH transition of CLK.

Eight signals are shown: CLK (clock, positive-edge triggered), DIR (direction control), SER_R (right-shift serial input), SER_L (left-shift serial input), and four outputs Q0, Q1, Q2, Q3 (all initially 1). During a right-shift (DIR=1), Q0 receives SER_R, Q1 receives Q0, Q2 receives Q1, and Q3 receives Q2. During a left-shift (DIR=0), Q3 receives SER_L, Q2 receives Q3, Q1 receives Q2, and Q0 receives Q1.

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

Constraints

  • The outputs only change state on the rising edge of CLK.
  • Boundary stages must receive the correct serial input (SER_R or SER_L) during a shift, rather than recirculating their own previous value.

Topics

Sequential LogicShift RegistersBoundary Conditions

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