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

4-Bit Universal Shift Register: Four-Mode Design

HardLogic CircuitBuild

Universal shift registers act as the primary data manipulation blocks in digital systems, handling serial-to-parallel conversion, parallel-to-serial conversion, and arithmetic bit-shifting within a single integrated component.

The circuit uses MODE1 and MODE0 to select the operation of four D flip-flops on the rising edge of clk. A 4-to-1 multiplexer at each flip-flop's input determines its next state. In this architecture, Q0 represents the leftmost bit and Q3 represents the rightmost bit.

| MODE1 | MODE0 | Operation | Q0 (Left) | Q1 | Q2 | Q3 (Right) | |---------|---------|-----------|-------------|------|------|--------------| | 0 | 0 | Hold | Q0 | Q1 | Q2 | Q3 | | 0 | 1 | Shift Right| SER_R | Q0 | Q1 | Q2 | | 1 | 0 | Shift Left| Q1 | Q2 | Q3 | SER_L | | 1 | 1 | Load | P0 | P1 | P2 | P3 |

Constraints

  • Implement exactly four D flip-flops.
  • Use a 4-to-1 multiplexer to drive the data input of each flip-flop.
  • Update all flip-flop states synchronously on the rising edge of clk.

Topics

MultiplexersSequential 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

  • 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