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

Debug: Lost MSB in Logical Shift Left

MediumLogic CircuitDebug

Serial protocols rely on shift registers to accurately assemble incoming data bits into parallel words. A 4-bit logical shift left circuit computes the next state by shifting a 4-bit input D one position to the left and appending a 1-bit serial input Sin to the lowest bit position.

Expected behavior:

| D (binary) | Sin | Q (binary) | |--------------|-------|--------------| | 0000 | 1 | 0001 | | 0001 | 0 | 0010 | | 0011 | 0 | 0110 | | 1000 | 1 | 0001 |

Simulation shows Q = 0111 for inputs D = 0011 and Sin = 0. The new least significant bit is incorrect. Inspect the circuit and correct the fault.

Constraints

  • Do not modify the input or output pins of the circuit.
  • Fix the wiring to correctly route the serial input.

Topics

shift-registerdebuggingbit-manipulation

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