BCD decoder and 7-segment display
A 4-bit binary number goes into a 74HC4511, which works out which of the seven segments to light for that digit. The display is seven LEDs with a common cathode, each with its own current-limiting resistor.

Open this lesson in the labFree, in your browser, no account needed.
How it works
Switches 1–4 are the bits D0 (worth 1), D1 (2), D2 (4) and D3 (8).
| D3 D2 D1 D0 | digit | segments |
|---|---|---|
| 0 0 0 0 | 0 | abcdef |
| 0 0 0 1 | 1 | bc |
| 0 0 1 0 | 2 | abdeg |
| 0 0 1 1 | 3 | abcdg |
| 0 1 0 0 | 4 | bcfg |
| 0 1 0 1 | 5 | acdfg |
| 0 1 1 0 | 6 | cdefg |
| 0 1 1 1 | 7 | abc |
| 1 0 0 0 | 8 | abcdefg |
| 1 0 0 1 | 9 | abcfg |
| 1010–1111 | blank | — |
Try it on the bench
- Set the switches to 0101: the display shows 5.
- Try 1010 (ten): the 4511 only does decimal, so it blanks the display.
- Select the display and set its resistors to 0 Ω (bare LEDs): the segments burn out. Every segment needs its own resistor.
Parts on the bench
- Bench power supply
- DIP switch module
- 74xx4511
- 7-segment display
In the course
Zen’s Electronics Design Mastery, module “Digital Electronics”.