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

Left Hand Side Concatenation Width Mismatch

HardLogic CircuitDebug

A 16-bit adder block computes the sum of two 16-bit integers and provides a carry-out flag for multi-precision arithmetic.

Expected behavior: The output Sum contains the lower 16 bits of the addition A + B. The output Cout contains the 17th bit representing the carry overflow.

Simulation shows Cout = 0 and Sum = 0 for inputs A = 32768 and B = 32768. The expected result is Cout = 1 and Sum = 0. The overflow bit is silently truncated and completely lost. Inspect the circuit and correct the fault.

Constraints

  • A and B are 16-bit input buses.
  • Sum is a 16-bit output bus.
  • Cout is a 1-bit output.

Topics

adderdebugbus-concatenationwidth-mismatch

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

  • Binary to HexEasy
  • 1-to-4 Demultiplexer from AND and NOT GatesEasy
  • 2-to-4 Line Decoder with Active-High EnableEasy
  • Hex Nibble to BinaryEasy
  • Odd Parity Bit Generator for 3-bit DataEasy
  • Full Adder from Half AddersEasy
  • Modulo ArithmeticMedium
  • Two's Complement: Encode a Negative DecimalEasy

Browse all problems · Learning tracks