Computing Library › Digital Logic & Circuits
Digital Logic & Circuits

Seven-Segment Decoder

A seven-segment decoder converts a binary-coded digit into the seven signals that light the correct segments of a numeric display.

The display

A seven-segment display shows a decimal digit using seven bar-shaped segments, labeled a through g, arranged in a figure-eight. Lighting the right combination of segments forms each digit 0 through 9. Some displays add a decimal point as an eighth segment.

What the decoder does

Kronos motion — customer segments

A seven-segment decoder takes a 4-bit binary-coded decimal input and produces seven outputs, one per segment. Each output is a Boolean function of the four input bits, asserting the segments needed for that digit. It is a specialized decoder mapping 4 inputs to a 7-bit pattern.

Deriving the logic

For each segment, list the digits that require it lit, then form a Boolean expression over the input bits. For example segment g, the middle bar, is off for digits 0, 1, and 7 and on for the rest. Simplifying each of the seven functions yields the gate network.

Common anode and cathode

Displays come in common-anode and common-cathode types, which need active-low or active-high segment drives respectively. The decoder's output polarity, or an inverter stage, is chosen to match the display.

Uses

Seven-segment decoders drive digital clocks, meters, and instrument readouts. They are a classic exercise in translating a truth table into minimized combinational logic.