Skip to content
Digital circuitsCHIP Chair Logo

BCD Digits

In digital circuits, a number known as Binary-Coded Decimal (BCD) is a way to represent decimal digits using 4 bits. Each digit from 0 to 9 is converted into a fixed binary pattern.

Decimal digitBCD
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001

This encoding is widely used in numeric displays and calculators.

Example: Design of a circuit for a 7-segment display

We want to build a circuit that receives a BCD digit and lights the corresponding segments of a seven-segment display (common-cathode) to show it.

D[3:0]=[D3 D2 D1 D0]7-segment display

The following figure shows how the segments are named:

Arrangement of the segments

In the table below we indicate which segments should light up for each input decimal digit D[3:0]. A 1 means the segment is on; a 0, off.

digit
decimal
BCD
D3D2D1D0
abcdefgdisplay
000001111110
100010110000
200101101101
300111111001
401000110011
501011011011
601101011111
701111110000
810001111111
910011111011
10
don't care
1010xxxxxxx
11
don't care
1011xxxxxxx
12
don't care
1100xxxxxxx
13
don't care
1101xxxxxxx
14
don't care
1110xxxxxxx
15
don't care
1111xxxxxxx

Don't-care Conditions

The 4 input bits can encode values from 0 to 15. However, a BCD digit only uses the values 0 to 9. The cases 10 to 15 are never shown and, therefore, are marked as x (Don't care).

When searching for groupings on the Karnaugh map, we can assign them the values that are most convenient to us in order to obtain simpler expressions.

Simplified Boolean expressions

A Karnaugh map must be created for each of the circuit outputs to obtain the Boolean expression for each segment.

Regarding the don't-care conditions, the value x=1 yields simpler equations.

The complete and detailed process can be found in several sources: Link 1, Link 2, Link 3

We obtain the following expressions for the segments:

  • Segment a:

    a=D3+D1+D2D0+D2D0
  • Segment b:

    b=D2+D1D0+D1D0
  • Segment c:

    c=D2+D1+D0
  • Segment d:

    d=D3+D2D0+D1D0+D2D1+D2D1D0
  • Segment e:

    e=D2D0+D1D0
  • Segment f:

    f=D3+D2D1+D1D0+D2D0
  • Segment g:

    g=D3+D2D1+D2D1+D1D0

These Boolean expressions allow implementing the circuit with AND, OR and NOT gates. The inputs are the bits D3,D2,D1,D0 and the outputs are the segments a,b,c,d,e,f,g.

This type of decoder is very common in basic digital electronics.

Verification with examples

To ensure the formulas function correctly, we compute a few digits.

Example: digit 2 D=0010

Expected results: segments a, b, d, e, g ON; c, f OFF.

  • segmenta=0+1+00¯+0¯0=1

  • segmentb=0¯+1¯0¯+10=1

  • segmentc=0+1¯+0=0

  • segmentd=0+0¯0¯+10¯+0¯1¯+01¯+0=1

  • segmente=0¯0¯+10¯=1

  • segmentf=0+01¯+1¯0¯+00¯=0

  • segmentg=0+0¯1+01¯+10¯=1

Example: digit 4 (D=0100

Expected results: segments b, c, f, g ON.

  • segmenta=0+0+10¯+1¯0=1

  • segmentb=1¯+0¯0¯+00=1

  • segmentc=1+0¯+0=1

  • segmentd=0+1¯0¯+00¯+1¯0¯+10¯0=0

  • segmente=1¯0¯+00¯=0

  • segmentf=0+10¯+0¯0¯+10¯=1

  • segmentg=0+1¯0+10¯+00¯=1

Example: digit 9 D=1001

Expected results: segments a, b, c, d, f, g ON.

  • segmenta=1+0+01¯+0¯1=1

  • segmentb=0¯+0¯1¯+01=1

  • segmentc=0+0¯+1=1

  • segmentd=1+0¯1¯+01¯+0¯0¯+00¯1=1

  • segmente=0¯1¯+01¯=0

  • segmentf=1+00¯+0¯1¯+01¯=1

  • segmentg=1+0¯0+00¯+01¯=1

Exercises at Jutge.org: Introduction to Digital Circuit Design

Remember that to access the exercises and for the Judge to evaluate your solutions you must be enrolled in the course. You will find all instructions here.



CHIP Chair Logos

Xavier Casas, Francesc Madrid
Lliçons.jutge.org
© Universitat Politècnica de Catalunya, 2026

lliçons.jutge.org