Codiode

Symmetric Shift Register Debouncer

MediumLogic CircuitBuild

Mechanical switches and buttons exhibit physical bounce upon both actuation and release, requiring robust digital filtering before interfacing with synchronous logic. A symmetric debouncer ensures clean transitions by waiting for the line to settle completely in either direction.

The circuit samples din on every rising clock edge into a 4-bit history sequence. The output dout must transition to 1 only after observing four consecutive 1s on din. It must transition to 0 only after observing four consecutive 0s on din. For any mixed sequence of inputs indicating ongoing bounce, dout must hold its previous state.

din_3 din_2 din_1 din_0 dout_next
0 0 0 0 0
1 1 1 1 1
1 0 1 1 dout
0 0 1 0 dout

Constraints

  • Implement a 4-bit shift register to capture the history of din.
  • Use a synchronous reset rst to clear all shift register bits and dout to 0.
  • Update dout only when the shift register contains exactly 1111 or 0000.

Topics

Shift RegisterInterfaceDebouncer

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 Interface and Communication Circuits

Problem 7 of 79 in the Interface and Communication Circuits track.

Related problems

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

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