Hex to 7-Segment Display Converter
The Hex to 7-Segment Display Converter looks up which segments (a through g) need to light up to show a given Hex Digit (0-F) on a standard seven-segment display. Enter your digit, click Convert, and see the lit segments listed in Lit Segments. The fastest way to get a rough Benjamin Moore paint name for a hex value is the hex to benjamin moore converter.
How the Hex to 7-Segment Display Converter Reveals Segment Activation
At its core, this tool converts hex values into a 7-bit output where each bit maps directly to one of the seven individual indicators labeled segment a through g that make up a seven segment readout. Understanding how this decoding works under the hood lets you debug your build faster, write tighter firmware, and cross-check your output driver configuration with confidence. Enter a hex value and pick a bit width in the hex to signed integer converter to see its signed decimal equivalent.
Understanding the Seven Segment Display Layout
A 7-segment indicator panel is a single unit built from seven components — typically arranged in a figure-eight pattern. Segment a is the top horizontal bar, segments f and b are the upper-left and upper-right verticals, segment g is the middle bar, segments e and c are the lower-left and lower-right verticals, and segment d is the bottom horizontal bar. The on off states of those seven components can be combined to produce simplified representations of numbers and letters — covering all ten decimal numerals (0–9) and the six letter digits (A–F) of the base-16 number system.
Each hex digit maps to a 7-bit bit pattern following the standard bit order notation:
Bit order: g f e d c b a
6 5 4 3 2 1 0Bit 0 (rightmost) controls segment a; bit 6 (leftmost) controls segment g. When a bit is 1, the corresponding segment lights up under normal logic (used in common cathode configurations). Under inverted logic (used in common anode configurations), the active state flips — a 0 drives the segment on. This distinction matters enormously in schematic work: connect the wrong logic type to your segment driver IC and every digit will appear wrong.
The relationship between a hex value and its segment output can be expressed as a lookup — each segment input hex digit selects a unique a-g output pattern. This is exactly what physical 7 segment hex decoder ICs such as the MC14495P1 implement in silicon. The MC14495P1 is a Motorola chip packaged in a 16-pin DIP that converts hex to seven-segment format with latch storage of code, CMOS-compatible input switching levels, high current sourcing outputs, low power dissipation, and outputs suited to driving segment panels directly. Its technical information is available in the MC14495 reference document, and it is RoHS compliant, making it a practical reference point when you need a physical interface that mirrors what this online tool simulates.
For BCD to segment decoding — where the segment input is binary-coded decimal rather than straight hex — the same segment patterns apply for digits 0–9. The hex/bcd to segment (SEG) instruction found in many PLC instruction sets, including ladder logic implementations on programmable controller platforms, uses this same mapping table: a single multi-digit hex value enters the instruction, and a 4×8-bit output containing the a-g output bytes is written to a writable location where you store converted value data. Remaining digits that fall outside the desired number of positions are set to 0x3F — the pattern for the value 0.
Worked Encoding Examples
Three concrete examples illustrate how segment activation maps to hex input values. Each example follows the bit order g f e d c b a:
- Displaying '0' —
0x3F: Bit pattern0011 1111. Bits a, b, c, d, e, f = 1; bit g = 0. All outer segments light up; the middle bar stays off. This is the most common segment pattern — and it's also the constant value used to blank unused digit positions in multi-digit readouts. - Displaying '1' —
0x06: Bit pattern0000 0110. Only bits b and c = 1 — minimal segment activation, just the two right-hand verticals. This is the simplest pattern in the entire base-16 mapping table and makes a clear visual test case for verifying wiring polarity. - Displaying '6' —
0x7D: Bit pattern0111 1101. Segments a, c, d, e, f, g = 1; segment b = 0. Under normal logic the upper-right vertical is off. Under inverted logic (common anode), the bit pattern inverts to1000 0010, meaning segment b drives high instead. This example best demonstrates why toggling between logic types in the converter matters for real schematic verification.
Additional standard pattern values you will encounter in reference documents and segment driver firmware include: 0x5B for '2', 0x4F for '3', 0x66 for '4', 0x6D for '5', 0x07 for '7', 0x7F for '8', 0x67 for '9', 0x77 for 'A', 0x7C for 'b', 0x39 for 'C', 0x5E for 'd', 0x79 for 'E', and 0x71 for 'F'.
Segment Bit Encodings for All Hex Values — Full Hex to 7-Segment Display Converter Reference Table
The table below is the authoritative segment encoding reference for all sixteen hex values. It lists the input decimal and input hex, the a-g output hex under normal logic (common cathode), each individual segment state, and the value shown. Use this alongside the converter to verify segment states digit by digit. When working with a common anode panel, invert all segment bits — or simply toggle the logic mode in the tool.
| Input (Decimal) | Input Hex | Output Hex (Normal Logic) | g | f | e | d | c | b | a | Display |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0x00 | 0x3F | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
| 1 | 0x01 | 0x06 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 2 | 0x02 | 0x5B | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 2 |
| 3 | 0x03 | 0x4F | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 3 |
| 4 | 0x04 | 0x66 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 4 |
| 5 | 0x05 | 0x6D | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 5 |
| 6 | 0x06 | 0x7D | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 6 |
| 7 | 0x07 | 0x07 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 7 |
| 8 | 0x08 | 0x7F | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 8 |
| 9 | 0x09 | 0x67 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 9 |
| 10 | 0x0A | 0x77 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | A |
| 11 | 0x0B | 0x7C | 1 | 1 | 1 | 1 | 1 | 0 | 0 | b |
| 12 | 0x0C | 0x39 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | C |
| 13 | 0x0D | 0x5E | 1 | 0 | 1 | 1 | 1 | 1 | 0 | d |
| 14 | 0x0E | 0x79 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | E |
| 15 | 0x0F | 0x71 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | F |
Note: The output hex column reflects normal logic for common cathode panels. For common anode panels using inverted logic, XOR each output byte with 0x7F to obtain the correct drive pattern. Lowercase hex digits a–f map to the same output characters as their uppercase equivalents — the converter handles both input forms transparently.
In PLC and industrial control environments, the SEG instruction encodes a single hex value into four consecutive bytes to store converted value data at a numeric memory location. The input decimal value, input hex code, and 4×8-bit a-g output are all maintained in a register or memory addressing block. Cast operations such as :UB0 (unsigned byte) for a single digit or :UW0 (unsigned word) for two digits let you truncate output to match the desired number of digits on your physical panel. A ladder rung in a PLC program typically shows the SEG block with a readable location as source and a writable location as destination — the instruction set handles the numeric conversion automatically, writing the segment states to the output device address in memory.
Hexadecimal-to-Seven Segment Encoding for Lowercase Hex Digits a–f
One frequently overlooked area of hex decoding is how lowercase hex digits behave. Many mapping tables only document uppercase A–F, but embedded systems firmware and processor code often passes lowercase hex values from string parsing routines. This hex to 7-segment display converter accepts lowercase input — digits a through f — and maps them to the identical segment patterns as their uppercase counterparts. The segment status produced is identical: for example, lowercase 'a' yields the same 0x77 output as 'A', lighting segments a, b, c, e, f, and g to render a recognisable 'A' shape on the segment panel.
This matters in gray code or scale value conversion pipelines where a convert hex value step may output mixed-case strings before the SEG instruction or equivalent convert BCD value routine processes them. Supporting both cases eliminates a class of silent pattern-mapping bug that is notoriously difficult to catch in physical prototyping without a tool to simulate segment activation.
Features and Use Cases of This Hex to 7-Segment Display Converter for Schematic Work
7-Segment Display Simulation and Verification Capabilities
The ability to simulate segment activation before committing to a physical build is the primary value this tool delivers. You can enter any single hex digit (0–F, including lowercase hex a–f), switch between cathode-grounded and anode-grounded output modes, and immediately see which segments activate under both normal logic and inverted logic configurations. The segment status readout updates in real time, letting you cross-reference your firmware's output byte against the expected segment pattern with zero delay.
Key capabilities of the tool include:
- Full hex range support: Handles all sixteen hex digits (0–F) covering the complete base-16 number system, including all ten decimal numerals and six letter digits.
- Lowercase hex input: Accepts both uppercase and lowercase hex digits — producing identical segment output in either case.
- Common cathode / common anode toggle: Switch between normal logic and inverted logic modes to match your physical panel interface without manually recalculating every bit.
- Non-standard mapping support: Where alternative mapping formats are required — for example, non-standard segment arrangements used in special-purpose readouts — the tool's output provides a baseline you can offset or XOR against your custom encoding table.
- Real-time segment simulation: The tool lets you simulate segment states instantly, making it suitable for use during live debugging sessions on embedded systems or digital projects.
- Bit-pattern view of patterns: Alongside the hex output, the bit-pattern view shows each individual bit position in the g-f-e-d-c-b-a order, so you can verify the mapping visually without mental arithmetic.
In terms of physical applications, this tool is relevant across a wide range of electronics contexts:
- Embedded systems and processor firmware: Verify the correct segment driver byte before writing it to a port register or SPI-connected segment output driver.
- Digital clocks and numeric readouts: Confirm that every digit in a multi-digit hex value renders correctly, including the remaining digits that should default to
0x3Fwhen unused. - PLC and industrial control automation: Cross-check the output of a SEG instruction's ladder rung against expected readout values in ladder programs. The tool's output matches the standard mapping table used by programmable controller platforms and is consistent with binary-coded decimal (BCD) formats used in automation systems.
- Physical prototyping and schematic verification: Whether you're using a dedicated segment driver IC in a 16-pin DIP package or driving segments directly from a processor GPIO, this tool gives you the correct bit patterns to load into your lookup table or numeric memory before your first power-up test. A 7 segment hex decoder IC like the MC14495P1 implements these same patterns in silicon.
- Educational use in digital electronics: Understanding how an IC converts a nibble of hex into on/off states for seven individual elements is a foundational concept in digital readout design and segment a through g activation courses.
From an integrated circuits perspective, physical implementations like the MC14495P1 — a CMOS-family chip with compatible input thresholds, high current sourcing outputs, latch storage of code, and standard CMOS-level switching — implement exactly the mapping table shown above. The device's 16-pin DIP package and low power dissipation make it a practical segment driver for battery-powered numeric readout applications. Its reference document lists the same a-g output mapping this tool uses, confirming that the online tool and the physical interface share the same format standard. The package is RoHS compliant, and the device falls under the special function category of integrated circuits from Motorola.
For deeper analysis of your hex values, several companion tools extend what you can do with the output of this converter:
To understand the base-10 meaning of your hex input, use the Hex to Decimal Converter for a complete numeric breakdown of hex values into decimal numerals.
To view the full bit-pattern representation of any hex digit before applying it to your segment pattern, run it through the Hex to Binary Converter for a bit-by-bit view of the bit layout.
To reverse-engineer a segment pattern back into its hex equivalent, the Binary to Hex Converter lets you start from bit patterns and arrive at the input hex value.
To mask or toggle individual bits within a segment byte — useful when working with patterns that share bits across multiple output device registers — the Hex Bitwise Calculator gives you full bitwise control over any hex value.
Note: In PLC environments, use the F9 key or click the three-dot box at the right edge of the parameter field to open the Default Element Selection Tool (Element Picker or Element Browser). Alternatively, use the down-arrow key (Auto-Complete) on any parameter field to browse the complete list of memory locations valid for the SEG instruction parameters — including the readable location for input and the writable location for the 4×8-bit a-g output. Related instructions include GRAY (gray code to integer conversion), SCALE (scale value operations), and cast operations for unsigned byte or unsigned word output truncation. See Also references in your PLC instruction set documentation will point to STR2INT and STR2REAL for numeric memory and numeric conversion workflows that feed into segment readout pipelines. Always confirm the memory location type — whether numeric location, constant value, or numeric memory — matches what your programmable controller's instruction set expects for each parameter of a single-output ladder rung.