How to display 5-bit binary number with two 7-segment LED displays?

Thread Starter

AverageMoss

Joined Apr 24, 2021
34
I'm working on a design for a 4-bit binary adder circuit using relays, no transistors.

The output is a 5-bit binary number (max number is 18) that I would like to show using a 7-segment LED display. I know that I can use an SN74LS47 chip to drive a 7-segment display, but obviously that can only display a 4-bit BCD number ranging from 0-9.

Is there any way that I can drive two 7-segment displays that can display any number ranging from 0-18?

I considered just displaying the raw binary number with LED's but binary is not very easy to read.
 

WBahn

Joined Mar 31, 2012
29,166
I'm working on a design for a 4-bit binary adder circuit using relays, no transistors.

The output is a 5-bit binary number (max number is 18) that I would like to show using a 7-segment LED display. I know that I can use an SN74LS47 chip to drive a 7-segment display, but obviously that can only display a 4-bit BCD number ranging from 0-9.

Is there any way that I can drive two 7-segment displays that can display any number ranging from 0-18?

I considered just displaying the raw binary number with LED's but binary is not very easy to read.
18 is an odd number? Why is that the max? Is it because your inputs are actually BCD and not binary, such that your maximum input is 9 + 9 = 18?

Are the values unsigned (so 0 through 18)?

Probably the easiest way would be do design your adder so that it is a BCD adder. If your inputs are already BCD and you need BCD outputs in order to drive two 7-seg displays, there's little reason to have your adder produce a binary result only to have to convert it back to BCD later.
 

dl324

Joined Mar 30, 2015
15,838
Is there any way that I can drive two 7-segment displays that can display any number ranging from 0-18?
Are you breadboarding the circuit? Or just simulating?

74185 is a ROM that implements the double dabble algorithm to convert binary to BCD.
 

dendad

Joined Feb 20, 2016
4,317
The 74185 ICs are quite expensive if you can find them!
It may be a lot easier and cheaper to use an Arduino or Raspberry Pi Pico to drive an LCD or OLED display.
 

dl324

Joined Mar 30, 2015
15,838
Hardware-wise, the easiest thing to do is to program a look up table in an EPROM. I programmed a 27C4002 with a table for 4 digits. That device has the outputs all on the same side of the chip which can simplify wiring.
 

MrChips

Joined Oct 2, 2009
29,236
Even easier than programming an EPROM is programming a simple MCU to do the binary to BCD conversion.
Hardware and software to program MCUs are more readily available that EPROM programmers.
 

WBahn

Joined Mar 31, 2012
29,166
A lot of this depends on what technology the TS is willing to use for what parts. There's presumably a reason they want to use just relays for the adder. How far does that reason extend? They seem happy using a 7447 to drive the actual displays. But what are they happy using in order to translate the adder output to BCD? Is the goal to make a binary adder using just relays, or to use relays to make an adder that add two one-digit numbers and produce a usable two-digit result? The TS has to decide that.

If this is a one-off project and the TS doesn't already have the hardware/software/experience to work with either EPROMs or MCUs, then the issue of whether the cost and effort to develop that ability is worth it because a dominant factor.
 
Top