Electronic – Display Double Digit Numbers on 2 seven segment displays


I'm making an Arithmetic Logic Unit(ALU) for an assignment and I'm on a point. So according to my circuit design on the link shared below, I am able to output 1 digit of my alu. It is a 4 bit ALU so the maximum output can be a result of an addition i.e. 9+9 = 18. This is where my problem is.

The correct output is shown until 9 on the 7 segment display. After that, random gibberish is shown. I added LEDs to see the binary output to check if the correct output is received in my simulation. Since there are only 4 bits, the output on LEDs also goes maximum to 1111 (for output 15 in decimal). After that it is reset to 0000 for 16 and starts all over again.

Can anyone please guide me with the correct approach to take here? How can I make 2 7 segment displays show my correct output in decimal? so that until the output is less than 9, the first 7 segment shows zero, but as soon as the output goes to 10, the first 7 segment displays a 1.

Help is much appreciated.

View post on imgur.com

Best Answer

This circuit could be simpler, but it achieves what you want without modifying your original circuit.

Complex circuit

http://imgur.com/XwqYME4 is the link to the photo so you can zoom in for better detail.