Decoders

BCD to 7-Segment decoder

To display any digit on 7-segment display the digit needs to be converted from BCD to 7-segment code. This is also must because any single digit BCD can be represented in 4-bits, but to display any single digit on "7-segment display" we need 7 bits. These 7 bits respectively glows 7 LEDs on the display, which together looks like a digit.

For example to display 3 on the display, LEDs a,b,c,d and g should glow and others should be off. Thus the seven bits code will be "1111001". Hence we need some kind of decoder which will convert BCD to appropriate 7 bit code that can be directly fed to the 7-segment-display.

A typical arrangement is shown below....

seven_segment_decoder

Truth table ..

Inputs Outputs
    A         B         C         D    
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
    a         b         c         d         e         f         g    
1 1 1 1 1 1 0
0 1 1 0 0 0 0
1 1 1 1 0 0 1
1 1 1 1 0 0 1
0 1 1 0 0 1 1
1 0 1 1 0 1 1
1 0 1 1 1 1 1
1 1 1 0 0 0 0
1 1 1 1 1 1 1
1 1 1 1 0 1 1
X X X X X X X
X X X X X X X
X X X X X X X
X X X X X X X
X X X X X X X
X X X X X X X


One can very well design this decoder from scratch, but there are already some BCD-to-seven segment decoder ICs (IC 7447) available, and which can reduce lot of efforts. Note that, IC 7447 gives active zero output, so please refer datasheet for using it.