Display Logic · 4 inputs, 6 don't-cares

7-Segment Display Decoder

A 7-segment display shows digits 0-9 using seven independently-controlled segments (labeled a through g). Each segment needs its own Boolean function of the 4-bit BCD input — this walks through deriving segment "a" completely, with the exact minimization verified against the live solver below.

The problem

A BCD (binary-coded decimal) input uses 4 bits to represent one decimal digit, 0 through 9. Bit patterns 1010 through 1111 (10-15) never occur in valid BCD — they're not just unused, they're guaranteed impossible if the rest of the system works correctly, which makes them genuine don't-cares rather than something to just leave as 0.

Segment "a" is the top horizontal segment. On a standard display, it's lit for every digit except 1 and 4:

DigitB3 B2 B1 B0Segment a
000001
100010
200101
300111
401000
501011
601101
701111
810001
910011
10-151010-1111X (don't-care)

The minimization

Using the tool below (labeling the BCD bits A=B3, B=B2, C=B1, D=B0), all four groups turn out essential — no Petrick's method tie-breaking needed here, every group is the only one covering at least one required cell:

a = B′D′ + C + BD + A

Each term corresponds to a real grouping: B′D′ covers the four-corner wraparound group {0,2,8,10}; C covers an entire 8-cell half of the map {2,3,6,7,10,11,14,15}; BD covers {5,7,13,15}; and A covers the whole upper half {8-15}. The don't-cares at 10-15 get absorbed into whichever groups they help enlarge — notice three of the four terms include at least one don't-care cell in their coverage.

Try it live

The solver below is pre-loaded with this exact problem. Toggle cells, switch to POS, or try a different variable count to see how the same engine handles it.

Input
Karnaugh Map
Minimal Result
Output format
F = 0
Prime Implicant Analysis
Auto-generated Circuit
Universal Gate Conversion

Frequently asked questions

Do the other 6 segments (b through g) work the same way?

Yes — each segment is its own independent Boolean function of the same 4 BCD input bits, with the same 6 don't-care codes. You'd repeat this exact process once per segment, each producing its own minimized expression and its own set of gates.

What happens if the don't-cares are ignored and treated as 0 instead?

The expression gets larger — some of the groupings above (B′D′ and BD in particular) rely on a don't-care cell to complete a valid rectangle. Forced to 0, those groups shrink or split, producing more terms for the same required outputs.

Why are all four terms essential here, with no alternate solutions?

Essential means each term is the only one covering at least one required cell — there's no overlap ambiguity to resolve. That's common for functions like this one where the required 1s form a few large, distinct, non-competing regions rather than a symmetric or cyclic pattern.