Menu

Theme

Tools · Tool · CHECKED ON 5.0.0

BCD to 7 segment decoder Logisim generator

A BCD to 7-segment decoder for Logisim turns a 4-bit number into the seven segment signals a to g. Choose BCD (0 to 9) or hex (0 to F), your display type (Logisim's 7-Segment Display is active high unless you change its Active On High attribute) and the output you want: a truth table, minimal equations per segment, a ROM image, or a .circ decoder that opens in Logisim-evolution. If you only need to show a hex digit, the Hex Digit Display decodes for you.
FOR
Students with a BCD to 7-segment lab, and counter or clock builders · Logisim-evolution 5.0.0
CHECKED
12 Nov 2026

7-segment decoder generator

Preview: choose an address, click segments to change its glyph.

Live preview from the table

0000 shows 0

D[4]CharabcdefgHex
0000011111100x3f
0001101100000x06
0010211011010x5b
0011311110010x4f
0100401100110x66
0101510110110x6d
0110610111110x7d
0111711100000x07
1000811111110x7f
1001911100110x67
1010A11101110x77
1011b00111110x7c
1100C10011100x39
1101d01111010x5e
1110E10011110x79
1111F10001110x71

Bit 0 = a, bit 7 = decimal point (always 0 here). A ROM cannot store a don't care, so those rows are 0 in the ROM.

Logisim’s 7-Segment Display: which input is which

The segments are a at the top, then b, c, d clockwise, e and f, with g in the middle. The display’s inputs are not in that order. From our measured geometry (F44):

7-Se1. Segment Ain 12. Segment Bin 13. Segment Cin 14. Segment Din 15. Segment Ein 16. Segment Fin 17. Segment Gin 18. Decimal pointin 1
Top edge, left to right: g, f, a, b. Bottom edge, left to right: e, d, c, decimal point. crosshair = the loc Logisim stores
Ports as a table
#PortDirectionWidthOffset from anchor
1Segment Ain1(20, 0)
2Segment Bin1(30, 0)
3Segment Cin1(20, 60)
4Segment Din1(10, 60)
5Segment Ein1(0, 60)
6Segment Fin1(10, 0)
7Segment Gin1(0, 0)
8Decimal pointin1(30, 60)
Input positions relative to the component
a(20, 0)0
b(30, 0)1
c(20, 60)2
d(10, 60)3
e(0, 60)4
f(10, 0)5
g(0, 0)6
Decimal point(30, 60)7

Hovering a port in Logisim shows “Segment A” to “Segment G” and “Decimal point” (F44). The 2.7.1 display has the same ports. Attributes we know of: Active On High (the XML name is active) and the colours. We did not test what Active On High does to the drawing.

Three ways to build the decoder

Which to use
Gates, one equation per segmentA lab asks for a gate-level design.Yes: circuit below, 16 of 16 rows
A ROM with 16 wordsYou want the fastest build or an easy change.Yes: 16 of 16 words, and the display showed 0 (F89)
A built-in partA project, not a graded lab: the Hex Digit Display, or the BFH decoder.BFH decoder: 0 to 9 yes, 10 to 15 float (F89)

With gates

For BCD with 10 to 15 as don’t care, the tool’s equations (Logisim syntax, a space is AND) are:

File bcd-equations.txt
a = D3 + ~D2 ~D0 + D2 D0 + D1
b = ~D2 + ~D1 ~D0 + D1 D0
c = D2 + ~D1 + D0
d = D2 ~D1 D0 + ~D2 D1 + ~D2 ~D0 + D1 ~D0
e = ~D2 ~D0 + D1 ~D0
f = D3 + D2 ~D1 + D2 ~D0 + ~D1 ~D0
g = D3 + ~D2 D1 + D2 ~D1 + D1 ~D0
circ-7seg-decoder-gates · mainscroll to see all
Generated by logisim.dev: a = D3 + ~D2 ~D0 + D2 D0 + D1; b = ~D2 + ~D1 ~D0 + D1 D0; c = D2 + ~D1 + D0; d = D2 ~D1 D0 + ~D2 D1 + ~D2 ~D0 + D1 ~D0; e = ~D2 ~D0 + D1 ~D0; f = D3 + D2 ~D1 + D2 ~D0 + ~D1 ~D3D2D1D0abcdefg
The gate decoder the tool wrote for BCD: four input pins, seven output pins a to g. CC BY 4.0 · SHA-256 b72a0cd360d0
Describe this circuit

Components: Input pin D3; Input pin D2; NOT Gate 1; Input pin D1; NOT Gate 2; Input pin D0; NOT Gate 3; AND Gate 1; AND Gate 2; AND Gate 3; AND Gate 4; AND Gate 5; AND Gate 6; AND Gate 7; AND Gate 8; AND Gate 9; OR Gate 1; Output pin a; OR Gate 2; Output pin b; OR Gate 3; Output pin c; OR Gate 4; Output pin d; OR Gate 5; Output pin e; OR Gate 6; Output pin f; OR Gate 7; Output pin g.

  • Input pin D3 connects to OR Gate 1, OR Gate 6, OR Gate 7 (net D3).
  • Input pin D2 connects to NOT Gate 1, AND Gate 2, AND Gate 5, AND Gate 8, AND Gate 9, OR Gate 3 (net D2).
  • NOT Gate 1 connects to AND Gate 1, AND Gate 6, OR Gate 2.
  • Input pin D1 connects to NOT Gate 2, AND Gate 4, AND Gate 6, AND Gate 7, OR Gate 1 (net D1).
  • NOT Gate 2 connects to AND Gate 3, AND Gate 5, AND Gate 8, OR Gate 3.
  • Input pin D0 connects to NOT Gate 3, AND Gate 2, AND Gate 4, AND Gate 5, OR Gate 3 (net D0).
  • NOT Gate 3 connects to AND Gate 1, AND Gate 3, AND Gate 7, AND Gate 9.
  • AND Gate 1 connects to OR Gate 1, OR Gate 4, OR Gate 5.
  • AND Gate 2 connects to OR Gate 1.
  • AND Gate 3 connects to OR Gate 2, OR Gate 6.
  • AND Gate 4 connects to OR Gate 2.
  • AND Gate 5 connects to OR Gate 4.
  • AND Gate 6 connects to OR Gate 4, OR Gate 7.
  • AND Gate 7 connects to OR Gate 4, OR Gate 5, OR Gate 7.
  • AND Gate 8 connects to OR Gate 6, OR Gate 7.
  • AND Gate 9 connects to OR Gate 6.
  • OR Gate 1 connects to Output pin a (net a).
  • OR Gate 2 connects to Output pin b (net b).
  • OR Gate 3 connects to Output pin c (net c).
  • OR Gate 4 connects to Output pin d (net d).
  • OR Gate 5 connects to Output pin e (net e).
  • OR Gate 6 connects to Output pin f (net f).
  • OR Gate 7 connects to Output pin g (net g).

Download the circuit and its vector. It has output pins only: connect them to the display as the pin order above shows, or use tunnels (tunnels). Logisim’s own Combinational Analysis can also build a circuit from the table.

With a ROM

File 7seg-hex-rom-image.txt
v2.0 raw
3f 6 5b 4f 66 6d 7d 7
7f 67 77 7c 39 5e 79 71

Download the image, the ROM decoder circuit and its vector. The circuit file already has a splitter and a display wired. Loading images: ROM and the memory image tool. The ROM decoder from the tool is the same design with your table.

With a built-in part

The BFH BCD to seven segment decoder and the Hex Digit Display are covered on the display page.

Active high or active low

Logisim’s display lights a segment when its input is 1. A common-anode display on a real board lights on 0. In Logisim you have two choices, and the tool offers both: invert the data, or keep the data and set the display’s Active On High attribute to off. The table shows what each does to the bits.

Symptoms
Every segment lit except the ones you wantThe data and the display disagree about polarity.
8 shows as blankSame cause, or the display's inputs are not driven.
Segments in the wrong placesOutputs wired in a to g order instead of the display's own order.

Glyph shapes

The default shapes are those of the Hex Digit Display, which we checked on screen: 7 is a, b, c only, and 9 has no bottom bar. Choose “with tails” for a 7 with f and a 9 with d.

LAB lab-lnx · Linux lab5.0.02026-11-12

Four Hex Digit Displays driven by the constants 6, 7, 9 and 1. The 6 has a top bar and a closed lower loop, the 7 is the top bar and the right side only, the 9 has the top, both upper sides, the middle bar and the lower right side but no bottom bar, and the 1 is the right side.

Hex Digit Display shapes for 6, 7, 9 and 1 in Logisim-evolution 5.0.0, Linux lab, enlarged 4 times (F110).lab-lnx-le500-hex-glyphs-01
Four Hex Digit Displays driven by 6, 7, 9 and 1, showing their segment shapes.

Limits

Four-bit decoders are the default; custom lists up to 64 entries give a table, equations and a ROM image, but the .circ files need 16 entries (ROM) or 6 input bits (gates). The ROM decoder file is made from our verified ROM circuit, so its pin names are N and W. Not in this version: the decimal point, K-maps per segment, 14 and 16 segment displays and a multi-digit generator. The .circ files are in the 5.0.0 format and do not open in classic 2.7.1 (F04); use the ROM image there. We did not test the digital-clock use of this tool.

Privacy

Everything is computed in your browser and nothing is sent anywhere.

Sources

  1. 7-Segment Display and Hex Digit Display ports in 5.0.0, logisim.dev lab data: test-data/lab2-2026-11-09-components/component-port-names-le500.tsv (F44)
  2. Built-in decoder, ROM decoder and display, logisim.dev lab data: test-data/FINDINGS.md F89
  3. Hex Digit Display shapes and generated-file runs, logisim.dev lab data: test-data/lab19-2026-11-12-7seg-tool/, scripts/qa_seg.mjs (F110)

Try: , , ,