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

Debug BCD Adder Correction Logic

HardLogic CircuitDebug

A BCD (Binary-Coded Decimal) adder performs base-10 arithmetic by adding two 4-bit BCD digits and applying a correction factor of 6 when the initial binary sum exceeds 9.

Expected behavior:

The circuit accepts two 4-bit BCD inputs A and B (valid range 0 to 9) and a carry-in Cin. It produces a 4-bit BCD sum S and a BCD carry-out Cout.

Simulation shows S = 1 and Cout = 0 for inputs A = 8, B = 9, and Cin = 0. The expected output is S = 7 and Cout = 1. The adder produces incorrect results for specific high-value input pairs. Inspect the circuit and correct the fault.

Constraints

  • Do not alter the initial 4-bit binary addition stage.
  • Ensure the correction logic correctly identifies all cases where a +6 adjustment is required.
  • Use standard combinational logic gates for the correction detection.

Topics

bcddebugadderscombinational-building-blocks

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