# Binary to BCD Converter

Discussion in 'General Electronics Discussion' started by Luke Vassallo, Apr 12, 2015.

1. ### Luke Vassallo

33
4
Dec 10, 2014
I am building a simple circuit that will add two 4 bit numbers. So far my plan is to do the addition, convert, multiplex, BCD-7seg convertor, to display.

I have seen that you can do it with shift registers however, I have no idea how they work, and it seems that they need some kind of clock.

Apart from that I could do the conversion using k-maps, but the problem is that I am going to end up with 6 very complex functions. Is there any other way ?

2. ### Harald KappModeratorModerator

10,585
2,360
Nov 17, 2011
I don't know why you do the math in binary numbers, anyway, why would you first convert binary to BCd and then BCd to 7-segment? You can do the conversion directly from binary to 7-segment code.

One simple way is a diode matrix (e.g. as described here). Another method could use a ROM to read the 7 segment code associated with a given binary number or a CPLD to implement the logic.

Merlin3189 likes this.
3. ### Merlin3189

250
69
Aug 4, 2011
As usual I think you need to say what it is you actually want to do: why do you want to build a circuit to add two 4 bit numbers? What is it you are trying to learn?
That would help people see what it is you need to design or build yourself and what bits you can just buy ready made - such as a 4 bit full adder chip!

Your comment about shift registers intrigues me. I have heard of serial adders, which use shift registers, but I've never actually met one in real life. Is serial data processing what you want to learn about?

If not, Harald has come up with some cracking ideas - really takes me back to the days before every electronic circuit has to have a Pic or Arduino and LCD display.

4. ### BobK

7,682
1,686
Jan 5, 2010
In other words, back to the days when any small change in behavior required a hardware revision.

Bob

5. ### Luke Vassallo

33
4
Dec 10, 2014
Well you're right no one would work with binary numbers. Originally this was a lab thing but i wanted to expand a bit. Multiplexor we weren't supposed to use and also, all we needed to display was up to the 18th digit (simple addition with 2 4bit numbers. So the maximum input number will be 9.

Now I just figured out that the lab will take place in 2 days so i don't have enough time to design something even more complex so for now i am doing this simple adder, with a few comparators and in the weekend or next week I will try to increase on it.

I will upload the schematic tonight.

6. ### Harald KappModeratorModerator

10,585
2,360
Nov 17, 2011
In fact, you're right and I am wrong, sorry for that. I misinterpreted your first post and thought you were using another code I had in mind at that time.

ANother solution - too late for your lab project, but keep it n mind anyway - is a binary to BCD decoder chip.