Codiode

BCD Ten's Complementer

HardLogic CircuitBuild

Financial systems and digital instrument panels process numbers directly in Binary-Coded Decimal to prevent precision loss. Subtraction in these architectures relies on ten's complement arithmetic rather than standard binary two's complement.

The circuit must compute the ten's complement of a 4-bit BCD digit A. This requires finding the nine's complement (9 minus A), then adding 1. If the result reaches 10, the output Y must wrap around to 0 and assert the carry out signal Cout. Assume the input will always be a valid BCD digit.

A Y Cout
0 0 1
1 9 0
2 8 0
3 7 0
4 6 0
5 5 0
6 4 0
7 3 0
8 2 0
9 1 0

Constraints

  • Implement using combinational logic only.
  • Do not use high-level binary subtraction blocks: construct the BCD-specific logic.
  • Treat input values greater than 9 as don't cares.

Topics

CombinationalArithmeticBCD

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.

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.

Part of Arithmetic and ALU Design

Problem 16 of 32 in the Arithmetic and ALU Design track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.