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

BCD to 7-Segment Decoder

MediumLogic CircuitBuild

Digital clocks, multimeters, and legacy instrumentation rely on translating binary-coded decimal values into human-readable numeric displays. The 7-segment decoder acts as the bridge between internal machine state and physical light-emitting diodes.

The circuit accepts a 4-bit binary input A, B, C, D (where A is the most significant bit) representing digits 0 through 9. It drives seven independent outputs corresponding to segments a through g. Input values 10 through 15 will never occur in a valid BCD system and act as don't-care conditions.

| A | B | C | D | a | b | c | d | e | f | g | |-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----| | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 |

Constraints

  • Implement the logic using only combinational gates.
  • Optimize each segment's logic independently by treating inputs 10 through 15 as don't-care conditions.
  • Minimize the total gate count for each output.

Topics

optimizationcombinational-logick-mapdecoder

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