BCD to 7 Segment Decoder
Cuthbert Nyack
A decoder using NAND gates which can be used to drive 7 segment
displays from a BCD input
is illustrated below. BCD input consists of A, B, C and D with A being
the LSB and D the MSB. States of A, B, C and D can be changed by clicking
on the appropriate tab. The circuit will display something with
inputs from 10 to 15. These are don't care states and in a real
system these inputs will not occur.
Blue corresponds to LOW and red to HI.
Table of BCD inputs for different segments
Decimal |
|
D |
C |
B |
A |
|
f(a) |
f(b) |
f(c) |
f(d) |
f(e) |
f(f) |
f(g) |
0 |
|
0 |
0 |
0 |
0 |
|
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
|
0 |
0 |
0 |
1 |
|
0 |
1 |
1 |
0 |
0 |
0 |
0 |
2 |
|
0 |
0 |
1 |
0 |
|
1 |
1 |
0 |
1 |
1 |
0 |
1 |
3 |
|
0 |
0 |
1 |
1 |
|
1 |
1 |
1 |
1 |
0 |
0 |
1 |
4 |
|
0 |
1 |
0 |
0 |
|
0 |
1 |
1 |
0 |
0 |
1 |
1 |
5 |
|
0 |
1 |
0 |
1 |
|
1 |
0 |
1 |
1 |
0 |
1 |
1 |
6 |
|
0 |
1 |
1 |
0 |
|
1 |
0 |
1 |
1 |
1 |
1 |
1 |
7 |
|
0 |
1 |
1 |
1 |
|
1 |
1 |
1 |
0 |
0 |
0 |
0 |
8 |
|
1 |
0 |
0 |
0 |
|
1 |
1 |
1 |
1 |
1 |
1 |
1 |
9 |
|
1 |
0 |
0 |
1 |
|
1 |
1 |
1 |
1 |
0 |
1 |
1 |
Karnaugh Map for f(a)
|
!A |
A |
A |
!A |
|
!B |
1 |
0 |
1 |
0 |
!D |
B |
1 |
1 |
1 |
1 |
!D |
B |
x |
x |
x |
x |
D |
!B |
1 |
1 |
x |
x |
D |
|
!C |
!C |
C |
C |
|
f(a) = !A!C + AC + B + D |
Decimal 10(1010) to 15(1111) are marked as x for don't care states.
Using squares with orange
letters and light blue background gives f(a) = !A!C + AC + B + D.
Similar analysis for the other segments using Karnaugh maps
gives:-
f(b) = !C + AB + !A!B
f(c) = A + !B + C
f(d) = !A!C + B!C + D + !AB + A!BC
f(e) = !A!C + !AB
f(f) = D +!AC + !A!B + !BC
f(g) = !AC + !BC + D + B!C
These functions are implemented in the applet below.
Return to main page
Return to page index
COPYRIGHT © 1996 Cuthbert A. Nyack.