Electrical – How to convert 8 bit binary to BCD using logical gates on multisim

analogboolean-algebradigital-logiclogic-gatesmultisim

I have a task to convert analogue signal to digital on multisim. But multisim have no Ic to convert 8 bit binary to BCD. Now I have to make logic circuits to convert 8 bit binary to bcd. I have used kmap technique to minimize first 4 bits than second four bits enter image description here

then I have designed logic circuits through minimized expressions.
enter image description here I have made two sets of 4,4 bit converters on ADC output pins like this.

enter image description here I have made this circuit on multisim but this is not converting a complete 8 bit binary to 8 bit bcd and not showing correct value of analog to digital

how I could convert a complete 8 bit binary to 8 bit bcd through single combinational logic circuit ?

Best Answer

First of all, you can't convert 8 bits binary to EXACTLY one BCD, you'll need 3 BCD converters: the maximum value with 8 bits is 255, supposing you have unsigned numbers, so 3 digits are needed.

You have two choices:

  1. Use asynchronous solution

    There's an algorithm "Double dabble" that does the conversion from binary to BCD. You can start from here: Double dabble

  2. Use synchronous solution

    Use an 8×12 bits RAM. The address is the 8 bit value, the content of the cell, and hence the output, will be your BCD value.