Fig. 1 — BCD-to-7-Segment DisplayInteractive simulation

A BCD-to-7-segment decoder converts one binary-coded decimal digit into the seven control signals that draw a numeral on a display.

What You'll Learn

  • Interpret A3..A0 as a single BCD digit from 0 through 9.
  • Map each valid BCD code to its active-HIGH a–g segment pattern.
  • Explain the functional boundary between the decoder and the display.
  • Recognize 1010₂ through 1111₂ as invalid BCD digit codes in this circuit.
  • Apply BCD display decoding to counters, clocks, and digital instruments.

How It Works

The four switches provide A3..A0, where A0 has weight 1 and A3 has weight 8. Valid binary-coded decimal (BCD) inputs range from 0000₂ through 1001₂, representing decimal digits 0 through 9.

The decoder maps each valid input to active-HIGH segment outputs a through g. For example, digit 0 lights a, b, c, d, e, and f but leaves the center segment g off. Digit 1 uses only b and c, while digit 8 lights all seven segments. The display component receives those seven lines directly.

BCD leaves six 4-bit combinations unused. In this simulator's verified decoder contract, inputs 1010₂ through 1111₂ drive every segment LOW, so the display is blank. That behavior is a defined property of this model; physical decoder ICs may use different active levels and may handle invalid inputs differently. Always check the device data sheet before transferring the table to hardware.

Truth Table

Outputs are ordered a, b, c, d, e, f, g and are active-HIGH. Rows 0–9 draw decimal digits; invalid BCD inputs 10–15 are blank in this simulator model.

InputsOutput
A3A2A1A0abcdefg
00001111110Digit 0 uses the outer six segments and leaves g off.
00010110000Digit 1 uses only the two right-hand segments b and c.
00101101101
00111111001
01000110011
01011011011
01101011111
01111110000Digit 7 combines the top segment with b and c.
10001111111Digit 8 lights all seven segments.
10011111011Digit 9 leaves only segment e off.
101000000001010₂ is not a valid BCD digit; the model blanks the display.
10110000000
11000000000
11010000000
11100000000
111100000001111₂ is also invalid BCD and produces the same blank pattern.

Try It Step-by-Step

Set the listed controls in the embedded circuit, then compare the observed modeled state with the expected result.

  1. 1
    A3..A0=0000
    Expected:Segments a, b, c, d, e, and f are HIGH; the display shows 0
    What you'll see:0000₂ selects the pattern for digit 0; only the center bar remains dark.
  2. 2
    A3..A0=0101
    Expected:Segments a, c, d, f, and g are HIGH; the display shows 5
    What you'll see:0101₂ is decimal 5, and the decoder lights the five segments needed to draw it.
  3. 3
    A3..A0=1001
    Expected:Segments a, b, c, d, f, and g are HIGH; the display shows 9
    What you'll see:1001₂ is the highest valid BCD digit and produces 9.
  4. 4
    A3..A0=1010
    Expected:All segment outputs are LOW; the display is blank
    What you'll see:1010₂ is decimal 10 in ordinary binary but is invalid as a single BCD digit, so this decoder blanks all segments.

Components Used

Applications and Design Context

Digital clocks and timers. Each decimal digit is stored or counted in BCD and decoded for a seven-segment readout.

Panel meters and bench instruments. Voltage, frequency, and event-count values are divided into decimal digits and displayed through decoder/driver stages.

Scoreboards and counters. Cascaded BCD counters and display decoders provide familiar decimal output without a general-purpose graphics controller.

Human-readable status panels. Appliances and embedded equipment use compact seven-segment indicators for modes, codes, and measurements.

Digital-logic education. The circuit demonstrates how an encoded word becomes a one-of-many visual pattern through combinational decoding.

Frequently Asked Questions

Why does BCD use four bits for only ten values?

Four bits are the minimum width that can encode ten states. BCD assigns ten combinations to digits 0–9 and leaves six combinations unused so each decimal digit can be processed independently.

What do segment names a through g mean?

They identify the display bars: a is the top bar, b and c are the upper- and lower-right bars, d is the bottom, e and f are the lower- and upper-left bars, and g is the center.

Why are values 10 through 15 blank?

They are invalid for a single BCD digit. This simulator's decoder intentionally drives all seven active-HIGH outputs LOW for those codes. Other decoder devices may blank them, show test patterns, or leave behavior device-specific.

Is this a common-anode or common-cathode display model?

The logical interface is active-HIGH: a segment turns on when its input is HIGH. Physical common-anode displays normally require active-LOW drive or inversion, while common-cathode displays normally use active-HIGH drive.

How are multi-digit numbers displayed?

Use one BCD digit and decoder per position, or multiplex several displays by rapidly selecting one digit at a time while presenting its segment pattern. The refresh rate must be high enough to appear continuous.

Continue Learning