Codiode

Bidirectional SR: Serial Inputs at Both Ends

MediumLogic CircuitBuild

Data link controllers and cryptographic stream ciphers require bidirectional data flow with independent boundary feeds. A bidirectional shift register with separate left and right serial inputs enables independent data loading depending on the active shift direction.

Implement a 4-bit bidirectional shift register with independent serial inputs. The register updates its state on every clock cycle based on the direction control signal dir. When shifting right, data enters at Q0 from SER_R and propagates toward Q3. When shifting left, data enters at Q3 from SER_L and propagates toward Q0. An asynchronous active-high rst clears all bits to 0.

rst dir Q3 (next) Q2 (next) Q1 (next) Q0 (next)
1 X 0 0 0 0
0 0 Q2 Q1 Q0 SER_R
0 1 SER_L Q3 Q2 Q1

Constraints

  • Use exactly four D flip-flops for state storage.
  • Use 2:1 multiplexers to route the correct next-state data to each flip-flop's D input.
  • Connect the asynchronous clear ports of all flip-flops to the rst signal.

Topics

Shift RegisterMultiplexersSequential 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.

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.

Part of Shift Registers

Problem 45 of 86 in the Shift Registers track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.