
What is BCD code?
In computing and electronic systems, binary-coded decimal (BCD) is used to encode decimal numbers (base-10) in a binary form where each decimal digit is represented by a nibble (4 bits).
For instance decimal number 5 is represented as 0101 in BCD as 5 = 4 + 1
| 8 | 4 | 2 | 1 |
| 0 | 1 | 0 | 1 |
The 16 hexadecimal digits in binary:
| Hexadecimal Digit | Binary Nibble |
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
| A | 1010 |
| B | 1011 |
| C | 1100 |
| D | 1101 |
| E | 1110 |
| F | 1111 |
Note that, when using BCD (as opposed to Hexadecimal) we only use digits 0 to 9. Numbers larger than 9, having two or more digits in the decimal system, are expressed one digit at a time using on nibble per digit. For example, the decimal number 365 is encoded as:
7-Segment Display
A lot of electronic devices use 7-segment displays (Watch, alarm clock, calculator etc.).
Typically 7-segment displays consist of seven individual coloured LED’s (called the segments). Each segment can be turned on or off to create a unique pattern/combination. Each segment is identified using a letter between A to G as follows:

The 16 hexadecimal digits can be displayed on a seven-segment display as follows:
![]() |
![]() |
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
BCD to 7-Segment Display: Truth Tables & Karnaugh Maps
We will use four inputs A,B,C and D to represent the four BCD digits as ABCD (A is the most significant digit, D is the least significant digit). When creating an electronic circuit we could use 4 switches to represent these 4 inputs.
We will need 7 outputs one for each segment. So let’s investigate each segment one at a time.
0000 |
0010 |
0011 |
0101 |
0110 |
0111 |
1000 |
1001 |
1010 |
1100 |
1110 |
1111 |
Segment A should be off for the following values:
0001 |
0100 |
1011 |
1101 |
Hence the Truth Table for Segment A is as follows:
| Inputs | Output | |||
| A | B | C | D | Segment A |
| 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
This Truth table can be represented using a Karnaugh Map:

Karnaugh Map for Segment A
BCD to 7-Segment Display: Boolean Expressions
The Karnaugh maps will help us define the Boolean Expressions associated with each of the 7 segments.
Boolean Expression:BCD to 7-Segment Display: Logic Gates Diagrams
We can now convert each Boolean expression into a Logic Gates circuit to link our 4 inputs (switches) to our 7-segment display using a range of logic gates.

Testing
You can now recreate your logic gates circuit using our logic gates studio tool to test if it behaves as expected for all 16 digits.
Hex/BCD to 7-Segment Display Integrated Circuit
All these 7 logic gates diagrams can all be integrated into one single integrated circuit: The CD74HCT4511E is a CMOS logic high-speed BCD to 7-segment Latch/Decoder/Driver with four inputs and is used to use these 4 inputs (Hex/BCD nibble) to control the display of a 7-segment display.






















