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

Multiplication Width Expansion

MediumVerilog / SystemVerilogBuild

Digital signal processing pipelines and arithmetic logic units frequently perform hardware multiplication operations. When multiplying two integer values, the resulting product requires a bit width equal to the sum of the bit widths of the two operands to guarantee no overflow occurs.

The module takes two 16-bit unsigned integer operands and computes their product. It continuously drives the full 32-bit result to the output port without truncating any bits.

This is a purely combinational circuit. Changes on any input port must immediately reflect on the output port.

| Signal | Direction | Width | Description | |--------|-----------|-------|-------------| | a | input | 16 | Unsigned multiplicand | | b | input | 16 | Unsigned multiplier | | prod | output | 32 | Full-width product of a and b |

Constraints

  • The module must be purely combinational with no clock or reset dependencies.
  • The output prod must capture the full 32-bit result to prevent overflow.
  • Operands a and b are treated as unsigned integers.

Topics

CombinationalArithmetic

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