# BCD to Seven Segment Display Decoder, I've problem with A to F

#### Saeed Saeed

Joined Jan 2, 2015
7
Hello,

I've a project which is basically described as this:

Design and implement a BCD to Seven Segment Display Decoder. Your decoder should have 5 inputs (4 for the binary number and 1 for the decimal point). It should have 8 outputs (7 segment and 1 for the decimal point). It should display from 0 until F (no do not care conditions).
I did this so far: Image

the issue is showing A,B, C, D, E,F

I know that 74LS47N to 7 segment shows the BCD 0 to 9. I don't know how to show the other.
I'm not experenced with any other stuff other than logic gatese, multiplexers, decoders.

#### tshuck

Joined Oct 18, 2012
3,534
Hello,

I've a project which is basically described as this:

I did this so far: Image

the issue is showing A,B, C, D, E,F

I know that 74LS47N to 7 segment shows the BCD 0 to 9. I don't know how to show the other.
I'm not experenced with any other stuff other than logic gatese, multiplexers, decoders.

Write a state table that has a number in binary as an input and 8 outputs - one for each LED in the seven segment display. Forget about the 74LS47.

X3|X2|X1|X0 | A|B|C|D|E|F|G|decimal point
0|0|0|0 | 1|1|1|1|1|1|0|0

Where X is the 4-bit input and A-G are the corresponding segments, and a segment in illuminated by a logic 1.

Last edited:

#### WBahn

Joined Mar 31, 2012
26,301
Hello,

I've a project which is basically described as this:

I did this so far: Image

the issue is showing A,B, C, D, E,F

I know that 74LS47N to 7 segment shows the BCD 0 to 9. I don't know how to show the other.
I'm not experenced with any other stuff other than logic gatese, multiplexers, decoders.

The problem is poorly crafted because BCD stands for Binary Coded DECIMAL, meaning that binary values A-F have no meaning. This is why BCD decoder ICs such as the 74LS47 make no effort to decode them (I wish they did) since that would require additional circuitry and make them cost more. They are treated as don't cares and produce whatever output they happen to produce as a consequence of how the ten defined input combinations are handled.

So if you want to display A-F, you need to design the logic to do so (which I'm thinking is the whole point of the exercise).

#### nerdegutta

Joined Dec 15, 2009
2,676
Have you seen the datasheet for the BCD?

As far as I can see, the 7447 cannot display the letters. But I might be wrong. Attached is a snip from the mentioned datasheet.

#### Attachments

• 8.3 KB Views: 132

#### takao21203

Joined Apr 28, 2012
3,695
The problem is poorly crafted because BCD stands for Binary Coded DECIMAL, meaning that binary values A-F have no meaning. This is why BCD decoder ICs such as the 74LS47 make no effort to decode them (I wish they did) since that would require additional circuitry and make them cost more. They are treated as don't cares and produce whatever output they happen to produce as a consequence of how the ten defined input combinations are handled.

So if you want to display A-F, you need to design the logic to do so (which I'm thinking is the whole point of the exercise).
Why do you say that? All these ICs, these kinds which are still made almost cost the same- next to nothing.
The TTL was designed 40 years ago and there were seperate ICs on purpose.
The HEX decoding ICs did fall into disuse at some point- I wasnt able to get them in a shop 15 years ago already. Nobody except necromancer DIY enthusiasts still mention them.

Before the internet was available it wasnt that easy- you had to mailorder from a catalogue, or inquire shop staff + pay moon prices for the parts. There were some shops in my town, over the years they all closed down except one. Since it was the only shop left, they also did grow. Some B2B offices too apparently- they wouldnt hand out single ICs.

So these kinds of TTL ICs were already in disuse before the rise of the internet, now with help of the same, old parts stockpiles return into circulation. A few kinds are still made actually.

Here on the forum it is tried every so often to resurrect ICs no real distributor will even remember.
There are some such as http://www.unicornelectronics.com/
which do have a stockpile of old ICs but it might be small, with only occasional sales.

Gone are these days of monolithic clock ICs, HEX decoders, bit slice CPUs, PROMS, and individual ALUs as well niceties such as FDCs (Floppy Disk controller).

#### takao21203

Joined Apr 28, 2012
3,695
here's something you should use.

If due to WW3 or something like that you arent longer able to use this technology, you wont be able to use TTL either. Thats what teachers told us- we cant allow calculator, WW3 breaks out, nobody can do maths anymore manually. Troll ministery of education- or was it the ministery of Troll education?

#### Attachments

• 298.5 KB Views: 61

#### nerdegutta

Joined Dec 15, 2009
2,676

#### takao21203

Joined Apr 28, 2012
3,695

#### WBahn

Joined Mar 31, 2012
26,301
Why do you say that? All these ICs, these kinds which are still made almost cost the same- next to nothing.
The TTL was designed 40 years ago and there were seperate ICs on purpose.
The HEX decoding ICs did fall into disuse at some point- I wasnt able to get them in a shop 15 years ago already. Nobody except necromancer DIY enthusiasts still mention them.
You actually make my point -- why else where there HEX to 7-seg as well as BCD to 7-seg? I'm not aware of any useful intent behind the A-F decodings of the BCD-7SEG decoders, so why make them when they could have simply used the HEX-7SEG ICs for both?

The additional circuitry costs more. It costs more in area (provided you are not pad-limited, which was not the case decades ago but often is the case today) and it costs more in operating power.

#### takao21203

Joined Apr 28, 2012
3,695
no wonder white population is declining- forced to wrestle with technology that apparently, is no longer made or sold. While in China, you can buy that STM8 module for $2. #### WBahn Joined Mar 31, 2012 26,301 no wonder white population is declining- forced to wrestle with technology that apparently, is no longer made or sold. While in China, you can buy that STM8 module for$2.
What are you babbling about and what relevance does it have to the OP's question?

#### takao21203

Joined Apr 28, 2012
3,695
You actually make my point -- why else where there HEX to 7-seg as well as BCD to 7-seg? I'm not aware of any useful intent behind the A-F decodings of the BCD-7SEG decoders, so why make them when they could have simply used the HEX-7SEG ICs for both?

The additional circuitry costs more. It costs more in area (provided you are not pad-limited, which was not the case decades ago but often is the case today) and it costs more in operating power.
tell me a serious application where that would make any difference- typically these ICs were deployed in hundreds on large boards.

Didactically significant virtual saving?

#### takao21203

Joined Apr 28, 2012
3,695
What are you babbling about and what relevance does it have to the OP's question?
About the fact we did that kind of circuits in college for quite a while, and it was a considerable waste of time. They also did withhold microcontrollers from us, which apparently, they did have available.

Back then, you'd had to pay the equivalent of $2000 for a development kit, actually. I havent forgotten it. #### tshuck Joined Oct 18, 2012 3,534 About the fact we did that kind of circuits in college for quite a while, and it was a considerable waste of time. They also did withhold microcontrollers from us, which apparently, they did have available. Back then, you'd had to pay the equivalent of$2000 for a development kit, actually.

I havent forgotten it.
Please stop attempting to derail the thread with your anecdotes. Take it to off-topic if you'd like to reminisce to no consequence.

#### tshuck

Joined Oct 18, 2012
3,534
Write a state table that has a number in binary as an input and 8 outputs - one for each LED in the seven segment display. Forget about the 74LS47.
[...]
Ah, yes, as WBahn noted, BCD does not account for A-F since the decimal in Binary Coded Decimal does not go past 9. I think you want a binary to seven segment decoder.

#### takao21203

Joined Apr 28, 2012
3,695
Ok OP needs a 4-input AND, with upto 4 inverters on each of the input, 16 of them, then diodes to OR the outputs to each segment.

I dont get why the learning process should be absent when I do that in software?

Anyway, you can do it hardware, nothing stopping you.
Only one of the AND outputs will be active at any time.

#### WBahn

Joined Mar 31, 2012
26,301
Ok OP needs a 4-input AND, with upto 4 inverters on each of the input, 16 of them, then diodes to OR the outputs to each segment.

I dont get why the learning process should be absent when I do that in software?

Anyway, you can do it hardware, nothing stopping you.
Only one of the AND outputs will be active at any time.
So your approach would involve 16 four-input AND gates (with ten transistors in each one, assuming CMOS), 32 inverters (with two transistors each), and 80 diodes. So that's 224 transistors and 80 diodes which will give you about four gate delays of propagation delay and be non-cascadable due to the diode drops. And that's not to mention the fact that the outputs will be of the wrong polarity to drive the same type of display, namely a common anode display, that the 74x47 is designed to drive.

Actually, you've just pretty convincingly demonstrated how much of the learning process IS absent when someone just does it in software since the method you propose is way too wasteful and inefficient and is not cascadable. Perhaps if you had paid attention when you did this stuff in college, instead of just telling yourself it was nothing but a waste of your time, you would have known that.

#### crutschow

Joined Mar 14, 2008
25,660
You could use a MC14495 which is a hex to 7-segment converter that includes A,b,C,d (if you can find one).

#### djsfantasi

Joined Apr 11, 2010
6,962
You could use a MC14495 which is a hex to 7-segment converter that includes A,b,C,d (if you can find one).
Finding one may be problematic. I searched while preparing my response that I am sure his professor would find a single IC solution unacceptable. My search didn't produce a source. Of course my intent was to make a point and not to procure one. Hence, I may not have looked far enough.
Edit: Apparently I decided not to post that one.

#### shteii01

Joined Feb 19, 2010
4,644
I am getting an impression that you are not supposed to use an integrated chip.