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

BCD Addition with Carry Correction

MediumLogic CircuitAnalyze

Hardware often interfaces directly with decimal displays where binary-coded decimal (BCD) simplifies the decoding logic. The system performs addition on two 4-bit BCD digits, A and B, producing a initial 4-bit binary sum S and a carry-out C_out. Because a 4-bit binary adder natively wraps at 16 while BCD wraps at 10, invalid states emerge when the sum exceeds 9.

Analyze the conditions under which a correction factor must be applied to the binary sum. Determine the corrected BCD sum for specific input combinations and identify the logic required to trigger the correction.

Constraints

  • Inputs A and B are guaranteed to be valid BCD digits (0 through 9).
  • The initial addition is performed by a standard 4-bit binary adder.
  • The bits of the initial sum are denoted as S3, S2, S1, and S0, where S3 is the most significant bit.

Topics

arithmeticbcdcombinational-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

  • Binary to HexEasy
  • 1-to-4 Demultiplexer from AND and NOT GatesEasy
  • 2-to-4 Line Decoder with Active-High EnableEasy
  • Full Adder from Half AddersEasy
  • Odd Parity Bit Generator for 3-bit DataEasy
  • Hex Nibble to BinaryEasy
  • Extract Expression from a Two-Level AND-OR Circuit with Fan-OutEasy
  • The Two Zeros Problem in Sign-MagnitudeEasy

Browse all problems · Learning tracks