# K-maps for forming 8bit binary to 8bit BCD digital circuit

I have been trying to convert 8bit binary to 8bit BCD. The circuit I have been working on is below: I built a 4bit binary to 5bit BCD converter using a similar truth table like the one here: Do I need a bigger truth table if I am going to design an 8bit binary to 8bit BCD converter? Also, are there any other ways I can create the converter circuit? Your help is much appreciated.

• You have 2 7-segment displays, which can handle decimal 0 to 99. 2^7 = 128. So at best you will have a 7 bit binary to 8 bit BCD. So you will need a bigger truth table. – StainlessSteelRat May 29 '19 at 13:25
• @StainlessSteelRat yeah I did the truth table. Its massive and I don't really know how I can get the K-maps for it. – AugieJavax98 May 29 '19 at 14:09
• @AugieJavax98 Still looking for some ideas? There are two easy and completely different ones I can imagine. – jonk May 31 '19 at 1:26

When doing arithmetic, K-maps are less useful than other techniques — basically, they are "too general" when doing something as specific as "sometimes I need to add 6 to a number".

Yes, you'll eventually get a correct answer after a lot of effort — and a lot of opportunities for errors to creep into the process. But if you think in terms of comparators and adders to begin with, you'll find that this is a much more direct approach.

• Using the comparator and adder method, I can do the shift add 3 process and get my result right? – AugieJavax98 May 29 '19 at 11:18
• I don't understand the question. There are many ways to implement binary-to-BCD conversion. Have you searched the Web for techniques? – Dave Tweed May 29 '19 at 11:25
• What I need to do is build a converter circuit that converts 8bit binary to 8bit BCD. I have searched the web, but most of what I've found are techniques for 4bit binary to 5bit BCD. To add on, all of the techniques involved the use of truth tables and K-maps. – AugieJavax98 May 29 '19 at 11:32

I'll suggest the more obvious of the two ideas that came to mind. If you haven't already done so, take a look at the double dabble algorithm for conversion. I'll use it as the basis for the following schematics (there are two.)

This first schematic accepts a binary value and leaves it unchanged if the value is $$\\le 4\$$. Otherwise, it adds $$\3\$$ to the binary input. There are some assumed illegal input values: $$\10-15\$$. But it doesn't really matter what happens there. So adding $$\3\$$ in those cases is fine. simulate this circuit – Schematic created using CircuitLab

The second schematic uses the above circuit (named PLUS3 below), repeatedly: simulate this circuit

That's all there is to implementing the algorithm documented on the Wiki page mentioned above.

Please do note that the output is 10-bit (or 12-bit if you don't mind going there.) But not 8-bit. (At least 10 bits are required for full conversion.) If you don't need the hundreds, then throw away those you don't need.