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

Register Priority Control Logic

MediumLogic CircuitBuild

Datapath registers frequently receive conflicting commands simultaneously. A pipeline stage might be told to hold its current value, accept an ALU result, or load data from memory all on the exact same clock cycle. The control logic must explicitly resolve these priorities to prevent undefined behavior.

Build a 4-bit register that resolves three control signals: synchronous clear (clr), parallel memory load (load), and ALU enable (en).

| clr | load | en | Next State (Q_next) | |-------|--------|------|-----------------------| | 1 | X | X | 0000 | | 0 | 1 | X | D_mem | | 0 | 0 | 1 | D_alu | | 0 | 0 | 0 | Q (Hold) |

Constraints

  • Use only basic logic gates (AND, OR, NOT, XOR) and standard D flip-flops.
  • Do not use pre-built multiplexer (MUX) components.
  • All control logic must be strictly combinational and placed before the D flip-flops.

Topics

MultiplexersRegistersControl 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.

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

  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Edge Detector Delayed by Extra CycleMedium
  • Signed vs Unsigned Comparison FailureHard
  • Incomplete Case StatementEasy
  • Counter Wrapping at Wrong ValueEasy

Browse all problems · Learning tracks