7-Segment Display
Type digits or hex and watch a 7-segment display light up, with the a–g segment map and the binary/hex driver code for each character.
Bit order DP g f e d c b a (common-cathode).
Seven bars, named a–g
A 7-segment display is just seven LEDs (plus an optional decimal point) arranged in a figure-8. Each is labelled by convention: a on top, then b c down the right, d across the bottom, e f up the left, and g through the middle.
Every character is a choice of which of those seven to turn on. That is why the same hardware can show 0–9 and a useful subset of letters (A b C d E F, H, L, P, U…) — it is a tiny seven-pixel font.
The segment byte
Drivers pack the segments into one byte, usually ordered DP g f e d c b a (bit 7 → bit 0). So digit 7 lights a, b, c → 0b00000111 = 0x07. This tool shows that exact value for each character so you can drop it straight into a lookup table.
Common cathode vs. common anode
Common cathode
All cathodes tied to ground. A segment lights when its pin is driven high. The byte above is used as-is.Common anode
All anodes tied to V+. A segment lights when its pin is driven low, so the driver byte is simply inverted (bitwise NOT).Where you still see them
Despite cheap dot-matrix and OLED screens, 7-segment displays are everywhere they need to be bright, cheap, and readable at a glance: microwave and oven clocks, digital multimeters, fuel pumps, scoreboards, elevator floor indicators, and countless hobby microcontroller projects — because nothing beats seven LEDs for showing a number.