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

Multiple Parallel Assignments

EasyVerilog / SystemVerilogBuild

Hardware engineers must think in parallel. Unlike software execution where instructions run sequentially from top to bottom, Verilog continuous assignments represent physical wires and logic gates. A wire driven at the bottom of a file is immediately available to a gate defined at the top. Understanding this concurrent nature is critical for designing correct RTL.

This module computes a simple logic chain using multiple interdependent signals. It takes four 1-bit inputs and produces a single 1-bit output. The logic requires two intermediate signals. The first intermediate signal is the logical AND of a and b. The second intermediate signal is the logical XOR of the first intermediate signal and c. The final output is the logical OR of the second intermediate signal and d.

This is a purely combinational circuit. There is no clock and no reset signal. The output must continuously reflect the current state of the inputs based on the described logic chain.

| Signal | Direction | Width | Description | |--------|-----------|-------|-------------| | a | input | 1 | First data input | | b | input | 1 | Second data input | | c | input | 1 | Third data input | | d | input | 1 | Fourth data input | | out | output | 1 | Final computed logic output |

Constraints

  • You must write exactly three assign statements.
  • To prove order independence, write the assignments in reverse logical order: assign out first, then the second intermediate signal, and finally the first intermediate signal.
  • You must declare the necessary internal wire signals before they are used in any assignment.
  • The module is purely combinational; do not use always blocks, reg types, clocks, or resets.
  • All inputs and the output are exactly 1-bit wide.

Topics

CombinationalContinuous AssignmentLanguage Basics

Solve this problem

Write the module in Verilog, SystemVerilog or VHDL. Your submission is compiled and simulated against a real testbench — you get the waveform back, not a stored answer.

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

  • Single Continuous AssignmentEasy
  • Basic Vector ConcatenationEasy
  • Ternary Operator MuxEasy
  • Underscores for ReadabilityEasy
  • Left Hand Side ConcatenationEasy
  • Inout Port MechanicsEasy
  • Explicit Binary LiteralsEasy
  • Vector Port EndiannessEasy

Browse all problems · Learning tracks