BCD to decimal decoder: 4 bits to 10 lines, live
A BCD to decimal decoder turns a 4-bit BCD code B3 B2 B1 B0 into one active output out of ten, Y0 to Y9. Because the codes 1010 to 1111 never occur in BCD, they are don't-cares, so most outputs need only two or three inputs: Y8 = B3 AND NOT B0 and Y9 = B3 AND B0.
A full 4-to-16 decoder would AND all four bits for every output. BCD only uses ten of the sixteen codes, and the six unused ones let the K-maps drop variables: Y2 to Y7 ignore B3 (the only valid codes with B3 = 1 are 1000 and 1001, so for 2 to 7 the low three bits already identify the digit), Y8 and Y9 need only B3 and B0, and only Y0 and Y1 still use all four bits. The cost of that saving is that an invalid code lights a wrong output, for example 1010 lights Y2 and Y8 together, so such a decoder must only see valid BCD. Chips of the 7442 family (TI's SN74LS42, for example) do this job with ten four-input NAND gates, fully decoding all four bits so invalid codes leave every output off. The circuit is the reverse of the decimal to BCD encoder. Compare the full 4-to-16 decoder and the BCD to 7-segment decoder. The ten valid codes are checked before the page is built, and the live circuit starts at 0000, so Y0 is lit.
Open this circuit in the lab →
What you need
- 4× NOT: NOT B3, NOT B2, NOT B1 and NOT B0
- 6× AND: Y0 and Y1: all four bits (three 2-input ANDs each)
- 12× AND: Y2 to Y7: B2, B1 and B0 only (two ANDs each)
- 2× AND: Y8 = B3 AND NOT B0, Y9 = B3 AND B0
Step by step
- Place inputs
B3toB0and probesY0toY9. - Write each output's minterm, then use codes 1010 to 1111 as don't-cares to drop variables.
- Build Y0 and Y1 from all four bits, Y2 to Y7 from B2 B1 B0, and Y8 and Y9 from B3 and B0.
- Count from 0000 to 1001: the lit output walks from Y0 to Y9.
BCD to decimal decoder truth table
| B3 B2 B1 B0 | Active output | Equation |
|---|---|---|
| 0000 | Y0 | B3' B2' B1' B0' |
| 0001 | Y1 | B3' B2' B1' B0 |
| 0010 | Y2 | B2' B1 B0' |
| 0011 | Y3 | B2' B1 B0 |
| 0100 | Y4 | B2 B1' B0' |
| 0101 | Y5 | B2 B1' B0 |
| 0110 | Y6 | B2 B1 B0' |
| 0111 | Y7 | B2 B1 B0 |
| 1000 | Y8 | B3 B0' |
| 1001 | Y9 | B3 B0 |
Codes 1010 to 1111 are not BCD; with these simplified equations they light two outputs at once, so the decoder relies on valid input.
You can also read the full theory in the lesson on BCD. Prefer to build it yourself from scratch? Open the digiwleea lab and place the gates on the canvas, or start from the logic gate simulator.
Build more parts from gates
Each of these is one step from a transistor to a working CPU. Build every gate from CMOS transistors and work all the way up in the free digiwleea lab, with the free theory reference alongside.
Open the BCD to decimal decoder in the lab →Frequently asked
What is a BCD to decimal decoder?
A circuit with four inputs and ten outputs that activates the one output whose number is the BCD digit on the inputs. It is also called a 4-line to 10-line decoder.
Why can a BCD decoder use simpler gates than a 4-to-16 decoder?
Because six of the sixteen input codes never occur in BCD. Treating them as don't-cares lets most outputs ignore one or two of the input bits.
What is the 7442?
A family of BCD to decimal decoder chips. TI's SN74LS42, for example, is built from eight inverters and ten four-input NAND gates and fully decodes all four bits, so every output stays off (high) for an invalid code.
What happens with an invalid BCD code?
In this simplified version, a code such as 1010 activates two outputs (Y2 and Y8). A fully decoding chip such as the SN74LS42 keeps every output off.