Designing a BCD-to-7-Segment Decoder From Scratch

The 7-segment decoder example works through segment "a" completely, as a live interactive walkthrough. This is the full companion: all seven segments, each independently minimized and verified, since a real decoder needs every one of them designed, not just one.

The segment map

Standard 7-segment digit patterns, with B3B2B1B0 as the BCD input (labeled A, B, C, D below) and codes 10-15 as don't-cares throughout, since they're invalid BCD and never occur:

Digitabcdefg
01111110
10110000
21101101
31111001
40110011
51011011
61011111
71110000
81111111
91111011

All seven, minimized and verified

a = B′D′ + C + BD + A
b = B′ + C′D′ + CD
c = C′ + D + B
d = B′D′ + B′C + BC′D + CD′ + A
e = B′D′ + CD′
f = C′D′ + BC′ + BD′ + A
g = B′C + BC′ + A + CD′

What stands out across all seven

Segment e is the simplest — just two terms — while segment d needs five. That variation is expected: each segment is independently minimized from its own truth table, and there's no reason different segments should compress to similar sizes just because they're part of the same display. Segment c reduces to only three single/double-literal terms (C′ + D + B) — worth noticing that it doesn't depend on A at all, meaning segment c's state is fully determined by the lower three BCD bits regardless of whether the digit is 0-7 or 8-9.

Building the complete circuit

Each of the seven expressions above becomes its own independent 2-level AND-OR circuit, all seven sharing the same four BCD input lines (A, B, C, D) but with entirely separate gates — there's no sharing of intermediate results between segments in a basic implementation, though larger-scale designs sometimes factor out common sub-expressions across segments as a further optimization beyond single-output K-map minimization.

See segment a solved interactively in the live example, or verify any of the other six directly on the 4-variable solver.

Try it on the solver

Work through the examples above directly — enter the same minterms or expression into the live tool.

Open the K-Map Solver